abaliyan commited on
Commit
b8de5c6
·
verified ·
1 Parent(s): 3c86eaf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -9
app.py CHANGED
@@ -6,15 +6,10 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
6
  st.title("Generating Response with HuggingFace Models")
7
  st.markdown("## Model: `facebook/blenderbot-400M-distill`")
8
 
9
- import os
10
- if "model" not in os.environ:
11
- with st.spinner("Getting this ready for you.."):
12
- model_name = "facebook/blenderbot-400M-distill"
13
- model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
14
- tokenizer = AutoTokenizer.from_pretrained(model_name)
15
-
16
- os.environ["MODEL"] = "1"#model
17
- os.environ["TOKENIZER"] = "1"#tokenizer
18
 
19
 
20
 
 
6
  st.title("Generating Response with HuggingFace Models")
7
  st.markdown("## Model: `facebook/blenderbot-400M-distill`")
8
 
9
+ with st.spinner("Getting this ready for you.."):
10
+ model_name = "facebook/blenderbot-400M-distill"
11
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
12
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
 
 
 
 
 
13
 
14
 
15