Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 139 |
-
with gr.Row(scale=1):
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|