Spaces:
Sleeping
Sleeping
Update chat.py
Browse files
chat.py
CHANGED
|
@@ -141,4 +141,12 @@ with gr.Blocks() as demo:
|
|
| 141 |
txt = gr.Textbox(show_label=True, placeholder="Enter text and press enter")
|
| 142 |
txt.submit(predict, [txt, state], [chatbot, state])
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
demo.launch(auth=("demouser", os.getenv('PASSWD')))
|
|
|
|
| 141 |
txt = gr.Textbox(show_label=True, placeholder="Enter text and press enter")
|
| 142 |
txt.submit(predict, [txt, state], [chatbot, state])
|
| 143 |
|
| 144 |
+
gr.ChatInterface(
|
| 145 |
+
fn=predict, chatbot=chatbot,
|
| 146 |
+
title="Chat with information about your insurance policy",
|
| 147 |
+
examples=["What is my policy number?", "Are dental expenses covered in my policy?"],
|
| 148 |
+
show_progress="full",
|
| 149 |
+
concurrency_limit=8
|
| 150 |
+
)
|
| 151 |
+
|
| 152 |
demo.launch(auth=("demouser", os.getenv('PASSWD')))
|