Spaces:
Runtime error
Runtime error
tbboukhari
commited on
Commit
•
507ccc3
1
Parent(s):
5b9feac
Update app.py
Browse files
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 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
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()
|