Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,9 +117,12 @@ def respond(
|
|
| 117 |
)
|
| 118 |
|
| 119 |
outputs = ""
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
description = """<p align="center">Defaults to Oumuamua-7b-RP (you can switch to other models from additional inputs)</p>
|
| 125 |
<p><center>
|
|
@@ -196,4 +199,4 @@ demo = gr.ChatInterface(
|
|
| 196 |
)
|
| 197 |
|
| 198 |
if __name__ == "__main__":
|
| 199 |
-
demo.launch()
|
|
|
|
| 117 |
)
|
| 118 |
|
| 119 |
outputs = ""
|
| 120 |
+
try:
|
| 121 |
+
async for output in stream:
|
| 122 |
+
outputs += output
|
| 123 |
+
yield outputs
|
| 124 |
+
except StopAsyncIteration:
|
| 125 |
+
pass # Handle end of iteration gracefully
|
| 126 |
|
| 127 |
description = """<p align="center">Defaults to Oumuamua-7b-RP (you can switch to other models from additional inputs)</p>
|
| 128 |
<p><center>
|
|
|
|
| 199 |
)
|
| 200 |
|
| 201 |
if __name__ == "__main__":
|
| 202 |
+
demo.launch()
|