edouiu3838 commited on
Commit
c7a66bc
·
verified ·
1 Parent(s): 11a33ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -18,4 +18,8 @@ user_input = st.text_input("Tu:", "")
18
  if st.button("Invia"):
19
  if user_input:
20
  response = chatbot(user_input, max_length=200, do_sample=True)
21
- st.text_area("Chatbot:", response[0]["generated_text"], height=200)
 
 
 
 
 
18
  if st.button("Invia"):
19
  if user_input:
20
  response = chatbot(user_input, max_length=200, do_sample=True)
21
+ st.text_area("Chatbot:", response[0]["generated_text"], height=200)
22
+ if chatbot is None:
23
+ print("Errore nel caricamento del modello.")
24
+ else: # Esegui una generazione di esempio
25
+ response = chatbot("Ciao, come stai?") print(response)