tbboukhari commited on
Commit
507ccc3
1 Parent(s): 5b9feac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -9,9 +9,13 @@ if "history" not in st.session_state:
9
  st.session_state.history = []
10
 
11
  def get_models():
12
- tokenizer = BlenderbotTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
13
- model = BlenderbotForConditionalGeneration.from_pretrained("facebook/blenderbot-400M-distill")
14
- return tokenizer, model
 
 
 
 
15
 
16
  def generate_answer():
17
  tokenizer, model = get_models()
 
9
  st.session_state.history = []
10
 
11
  def get_models():
12
+
13
+ model_name = "tbboukhari/chatbot-produit-fr"
14
+
15
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name, device_map="auto")
16
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
17
+
18
+ return tokenizer, model
19
 
20
  def generate_answer():
21
  tokenizer, model = get_models()