Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,7 +69,7 @@ rag_chain = (
|
|
| 69 |
|
| 70 |
import gradio as gr
|
| 71 |
|
| 72 |
-
def rag_memory_stream(text
|
| 73 |
partial_text = ""
|
| 74 |
for new_text in rag_chain.stream(text):
|
| 75 |
partial_text += new_text
|
|
@@ -91,14 +91,9 @@ chatbot = gr.Chatbot([{"role":"assistant", "content":"Hey I am medical expert, h
|
|
| 91 |
|
| 92 |
|
| 93 |
title = "Medical Expert :) Try me!"
|
| 94 |
-
demo = gr.ChatInterface(rag_memory_stream,
|
| 95 |
type="messages",
|
| 96 |
title=title,
|
| 97 |
-
fill_height=True,
|
| 98 |
-
examples=examples,
|
| 99 |
-
theme=gr.themes.Soft(),
|
| 100 |
-
description=description,
|
| 101 |
-
chatbot=chatbot
|
| 102 |
)
|
| 103 |
|
| 104 |
|
|
|
|
| 69 |
|
| 70 |
import gradio as gr
|
| 71 |
|
| 72 |
+
def rag_memory_stream(text):
|
| 73 |
partial_text = ""
|
| 74 |
for new_text in rag_chain.stream(text):
|
| 75 |
partial_text += new_text
|
|
|
|
| 91 |
|
| 92 |
|
| 93 |
title = "Medical Expert :) Try me!"
|
| 94 |
+
demo = gr.ChatInterface(fn=rag_memory_stream,
|
| 95 |
type="messages",
|
| 96 |
title=title,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
)
|
| 98 |
|
| 99 |
|