Svngoku commited on
Commit
b21f32e
·
verified ·
1 Parent(s): 75e77e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -13
app.py CHANGED
@@ -53,21 +53,14 @@ def generate_response(message, history, documents_text):
53
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
54
  """
55
  demo = gr.ChatInterface(
56
- generate_response,
 
57
  additional_inputs=[
58
- gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
59
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
60
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
61
- gr.Slider(
62
- minimum=0.1,
63
- maximum=1.0,
64
- value=0.95,
65
- step=0.05,
66
- label="Top-p (nucleus sampling)",
67
- ),
68
  ],
 
 
69
  )
70
 
71
-
72
  if __name__ == "__main__":
73
- demo.launch()
 
53
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
54
  """
55
  demo = gr.ChatInterface(
56
+ fn=generate_response,
57
+ type="messages",
58
  additional_inputs=[
59
+ gr.Textbox(lines=5, placeholder="Enter documents (heading: body) separated by new lines...")
 
 
 
 
 
 
 
 
 
60
  ],
61
+ title="Simple Chat with RAG",
62
+ description="Ask a question and provide relevant documents for context"
63
  )
64
 
 
65
  if __name__ == "__main__":
66
+ demo.launch()