ishaandtotoro commited on
Commit
4d00bc7
·
verified ·
1 Parent(s): c5916d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -7
app.py CHANGED
@@ -133,10 +133,17 @@ def respond(message, history):
133
 
134
  return response['choices'][0]['message']['content'].strip()
135
 
136
- with gr.Blocks(theme='earneleh/paris') as chatbot:
137
- with gr.Row(scale=1):
138
- gr.Image("ai.png")
139
- with gr.Row(scale=1):
140
- gr.ChatInterface(respond, type= 'messages')
141
-
142
- chatbot.launch()
 
 
 
 
 
 
 
 
133
 
134
  return response['choices'][0]['message']['content'].strip()
135
 
136
+ # with gr.Blocks(theme='earneleh/paris') as chatbot:
137
+ # with gr.Row(scale=1):
138
+ # gr.Image("ai.png")
139
+ # with gr.Row(scale=1):
140
+ # gr.ChatInterface(respond, type= 'messages')
141
+
142
+ greeting = gr.Interface(
143
+ fn=greet,
144
+ inputs=["text", gr.Slider(value=2, minimum=1, maximum=10, step=1)],
145
+ outputs=[gr.Textbox(label="greeting", lines=3)])
146
+
147
+ chatbot = gr.ChatInterface(respond, type= 'messages')
148
+ demo = gr.TabbedInterface([greeting, chatbot], ["Greeting", "Chat"])
149
+ demo.launch()