Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
gr.Examples(
|
4 |
examples=[
|
5 |
'Hello there! How are you doing?',
|
@@ -8,7 +15,10 @@ gr.Examples(
|
|
8 |
'How many hours does it take a man to eat a Helicopter?',
|
9 |
"Write a 100-word article on 'Benefits of Open-Source in AI research'",
|
10 |
],
|
11 |
-
|
|
|
|
|
|
|
12 |
)
|
13 |
|
14 |
# Load the Gradio interface
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
textbox = gr.Textbox(
|
4 |
+
container=False,
|
5 |
+
show_label=False,
|
6 |
+
placeholder='Type a message...',
|
7 |
+
scale=10,
|
8 |
+
)
|
9 |
+
|
10 |
gr.Examples(
|
11 |
examples=[
|
12 |
'Hello there! How are you doing?',
|
|
|
15 |
'How many hours does it take a man to eat a Helicopter?',
|
16 |
"Write a 100-word article on 'Benefits of Open-Source in AI research'",
|
17 |
],
|
18 |
+
inputs=textbox,
|
19 |
+
outputs=[textbox, chatbot],
|
20 |
+
fn=process_example,
|
21 |
+
cache_examples=True,
|
22 |
)
|
23 |
|
24 |
# Load the Gradio interface
|