Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import streamlit as st | |
from transformers import BartTokenizer, BartForConditionalGeneration | |
from transformers import T5Tokenizer, T5ForConditionalGeneration | |
st.title('Text Summarization Demo') | |
st.markdown('Using BART and T5 transformer model') | |
model = st.selectbox('Select the model', ('BART', 'T5')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Import streamlit library | |
import streamlit as st | |
st.title("Medium Article Generator") #set title of website | |
starting_sentence = st.text_input(label='Enter Starting Sentence') #set input and label | |
#Function to run model and generate new text | |
@st.cache | |
def generate(): | |
import gpt_2_simple as gpt2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
from ludwig.api import LudwigModel | |
import pandas as pd | |
st.cache(show_spinner=False) | |
def load_model(): | |
#Update with the path to the Ludwig trained model | |
model = LudwigModel.load("results/experiment_run_1/model/") | |
return model |