seawolf2357 commited on
Commit
e4ecada
·
verified ·
1 Parent(s): 4821c8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -32,18 +32,18 @@ def respond(message, history: list[tuple[str, str]], system_message, max_tokens,
32
 
33
  chatbot = gr.Chatbot(height=600)
34
 
35
- demo = gr.ChatInterface(
36
- fn=respond,
37
- inputs=[
38
- gr.Textbox(label="Your Message"),
39
- gr.Textbox(value="", label="System message"),
40
- gr.Slider(minimum=1, maximum=2048, value=512, label="Max new tokens"),
41
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, label="Temperature"),
42
- gr.Slider(minimum=0.1, maximum=1.0, value=0.95, label="Top-P")
43
- ],
44
- outputs=chatbot,
45
- theme="Nymbo/Nymbo_Theme"
46
  )
47
 
48
  if __name__ == "__main__":
49
- demo.launch()
 
32
 
33
  chatbot = gr.Chatbot(height=600)
34
 
35
+
36
+
37
+ def chat_function(message):
38
+ return "Response to: " + message
39
+
40
+ chat_interface = gr.Interface(
41
+ fn=chat_function,
42
+ inputs=gr.Textbox(),
43
+ outputs=gr.Textbox(),
44
+ title="Simple Chatbot",
45
+ description="This is a simple chatbot example."
46
  )
47
 
48
  if __name__ == "__main__":
49
+ chat_interface.launch()