fengtc commited on
Commit
bb904d5
1 Parent(s): cd86d2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -28,4 +28,19 @@ def predict(message, history):
28
  partial_message = partial_message + chunk['choices'][0]['delta']['content']
29
  yield partial_message
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  gr.ChatInterface(predict).queue().launch(auth=(USER, PASS))
 
28
  partial_message = partial_message + chunk['choices'][0]['delta']['content']
29
  yield partial_message
30
 
31
+ gr.Examples(
32
+ examples=[
33
+ 'Hello there! How are you doing?',
34
+ 'Can you explain briefly to me what is the Python programming language?',
35
+ 'Explain the plot of Cinderella in a sentence.',
36
+ 'How many hours does it take a man to eat a Helicopter?',
37
+ "Write a 100-word article on 'Benefits of Open-Source in AI research'",
38
+ ],
39
+ inputs=textbox,
40
+ outputs=[textbox, chatbot],
41
+ fn=process_example,
42
+ cache_examples=True,
43
+ )
44
+
45
+
46
  gr.ChatInterface(predict).queue().launch(auth=(USER, PASS))