abubasith86 commited on
Commit
699cd0d
·
1 Parent(s): b41e859

aditional args not added

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -37,7 +37,6 @@ Your goals:
37
  - Always be polite, helpful, and respectful.
38
  """
39
 
40
-
41
  def respond(
42
  message,
43
  history: list[tuple[str, str]],
@@ -74,19 +73,20 @@ def respond(
74
  """
75
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
76
  """
77
-
78
-
79
- with gr.Blocks() as demo:
80
- gr.Markdown("## 🤖 Smart AI Chatbot (PDF + Web + General QA)")
81
- chat = gr.ChatInterface(
82
- respond,
83
- additional_inputs=[
84
- gr.Textbox(value="You are a helpful assistant.", label="System message"),
85
- gr.Slider(1, 2048, value=512, step=1, label="Max new tokens"),
86
- gr.Slider(0.1, 4.0, value=0.7, step=0.1, label="Temperature"),
87
- gr.Slider(0.1, 1.0, value=0.95, step=0.05, label="Top-p"),
88
- ],
89
- )
 
90
 
91
  if __name__ == "__main__":
92
  demo.launch()
 
37
  - Always be polite, helpful, and respectful.
38
  """
39
 
 
40
  def respond(
41
  message,
42
  history: list[tuple[str, str]],
 
73
  """
74
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
75
  """
76
+ demo = gr.ChatInterface(
77
+ respond,
78
+ additional_inputs=[
79
+ gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
80
+ gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
81
+ gr.Slider(
82
+ minimum=0.1,
83
+ maximum=1.0,
84
+ value=0.95,
85
+ step=0.05,
86
+ label="Top-p (nucleus sampling)",
87
+ ),
88
+ ],
89
+ )
90
 
91
  if __name__ == "__main__":
92
  demo.launch()