Spaces:
Sleeping
Sleeping
Tafazzul-Nadeeem
commited on
Commit
·
bb65cff
1
Parent(s):
757f397
Prescription feature done
Browse files
app.py
CHANGED
|
@@ -142,13 +142,13 @@ with gr.Blocks() as demo:
|
|
| 142 |
#######################################################################
|
| 143 |
|
| 144 |
# history.append({"role": "assistant", "content": response})
|
| 145 |
-
history.append({"role": "assistant", "content": ""})
|
| 146 |
|
| 147 |
-
# return history
|
| 148 |
-
for character in response:
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
|
| 153 |
|
| 154 |
##########################################################################
|
|
@@ -159,7 +159,7 @@ with gr.Blocks() as demo:
|
|
| 159 |
placeholder="Enter message or upload file...",
|
| 160 |
show_label=False
|
| 161 |
)
|
| 162 |
-
clear = gr.Button("
|
| 163 |
clear.click(
|
| 164 |
clear_and_load,
|
| 165 |
inputs=None,
|
|
|
|
| 142 |
#######################################################################
|
| 143 |
|
| 144 |
# history.append({"role": "assistant", "content": response})
|
| 145 |
+
history.append({"role": "assistant", "content": "response"})
|
| 146 |
|
| 147 |
+
# # return history
|
| 148 |
+
# for character in response:
|
| 149 |
+
# history[-1]['content'] += character
|
| 150 |
+
# time.sleep(0.005)
|
| 151 |
+
# yield history
|
| 152 |
|
| 153 |
|
| 154 |
##########################################################################
|
|
|
|
| 159 |
placeholder="Enter message or upload file...",
|
| 160 |
show_label=False
|
| 161 |
)
|
| 162 |
+
clear = gr.Button("New Chat")
|
| 163 |
clear.click(
|
| 164 |
clear_and_load,
|
| 165 |
inputs=None,
|