arielleharris commited on
Commit
07711db
·
verified ·
1 Parent(s): babad39

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  from transformers import pipeline
 
2
 
3
  """
4
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
@@ -23,7 +24,7 @@ def faq_chatbot(user_input):
23
  return response
24
 
25
  # If no FAQ match, use the AI model to generate a response
26
- conversation = chatbot(user_input)
27
  return conversation[0]['generated_text']
28
 
29
  # Create the Gradio interface
 
1
  from transformers import pipeline
2
+ import gradio as gr # Import Gradio for the interface
3
 
4
  """
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
 
24
  return response
25
 
26
  # If no FAQ match, use the AI model to generate a response
27
+ conversation = chatbot(user_input, max_length=50, num_return_sequences=1)
28
  return conversation[0]['generated_text']
29
 
30
  # Create the Gradio interface