Simon Salmon commited on
Commit
07bf672
·
1 Parent(s): 41d0dc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,8 +2,8 @@ import torch
2
  from transformers import T5ForConditionalGeneration,T5Tokenizer, AutoTokenizer, AutoModelForSeq2SeqLM
3
  import streamlit as st
4
  model_name = st.text_input("Pick a Model", "seduerr/t5-pawraphrase")
5
- tokenizer = AutoTokenizer.from_pretrained(model_name)
6
- model = AutoModelForSeq2SeqLM.from_pretrained("t5-base")
7
 
8
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
9
  model = model.to(device)
 
2
  from transformers import T5ForConditionalGeneration,T5Tokenizer, AutoTokenizer, AutoModelForSeq2SeqLM
3
  import streamlit as st
4
  model_name = st.text_input("Pick a Model", "seduerr/t5-pawraphrase")
5
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
6
+ tokenizer = AutoTokenizer.from_pretrained("t5-base")
7
 
8
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
9
  model = model.to(device)