Jether commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,11 +56,26 @@ demo = gr.ChatInterface(
|
|
| 56 |
step=0.05,
|
| 57 |
label="Top-p (nucleus sampling)",
|
| 58 |
),
|
| 59 |
-
|
| 60 |
],
|
| 61 |
)
|
| 62 |
|
| 63 |
|
| 64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
if __name__ == "__main__":
|
| 66 |
demo.launch(share=True)
|
|
|
|
| 56 |
step=0.05,
|
| 57 |
label="Top-p (nucleus sampling)",
|
| 58 |
),
|
| 59 |
+
|
| 60 |
],
|
| 61 |
)
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
+
|
| 66 |
+
import random
|
| 67 |
+
|
| 68 |
+
def random_response(message, history):
|
| 69 |
+
return random.choice(["Hi!", "Hello!", "Greetings!"])
|
| 70 |
+
|
| 71 |
+
with gr.Blocks() as demo:
|
| 72 |
+
gr.ChatInterface(
|
| 73 |
+
random_response,
|
| 74 |
+
title="Greeting OptoBot",
|
| 75 |
+
description="Ask anything and receive a nice greeting!",
|
| 76 |
+
)
|
| 77 |
+
gr.DeepLinkButton()
|
| 78 |
+
|
| 79 |
+
|
| 80 |
if __name__ == "__main__":
|
| 81 |
demo.launch(share=True)
|