Spaces:
Runtime error
Runtime error
Cache examples (#3)
Browse files- Cache examples (22922bcf6375a1d0bce71bc5738e989ce12b852c)
app.py
CHANGED
@@ -138,13 +138,15 @@ with gr.Blocks(css='style.css') as demo:
|
|
138 |
gr.Examples(
|
139 |
examples = [
|
140 |
["Hello there! How are you doing?"],
|
141 |
-
["Can you explain to me
|
142 |
["Explain the plot of Cinderella in a sentence."],
|
143 |
["How many hours does it take a man to eat a Helicopter?"],
|
144 |
["Write a 100-word article on 'Benefits of Open-Source in AI research'"]
|
145 |
-
],
|
146 |
-
inputs
|
147 |
-
|
|
|
|
|
148 |
)
|
149 |
gr.Markdown(LICENSE)
|
150 |
|
|
|
138 |
gr.Examples(
|
139 |
examples = [
|
140 |
["Hello there! How are you doing?"],
|
141 |
+
["Can you explain briefly to me what is the Python programming language?"],
|
142 |
["Explain the plot of Cinderella in a sentence."],
|
143 |
["How many hours does it take a man to eat a Helicopter?"],
|
144 |
["Write a 100-word article on 'Benefits of Open-Source in AI research'"]
|
145 |
+
],
|
146 |
+
inputs=textbox,
|
147 |
+
outputs=[textbox, chatbot],
|
148 |
+
fn=process_example,
|
149 |
+
cache_examples=True,
|
150 |
)
|
151 |
gr.Markdown(LICENSE)
|
152 |
|