Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,10 @@ def generate_response(prompt, stream=True):
|
|
33 |
except requests.exceptions.RequestException as e:
|
34 |
yield f"Error: {e}"
|
35 |
|
|
|
|
|
|
|
|
|
36 |
# Button to trigger response
|
37 |
if st.button("Generate Response"):
|
38 |
if prompt.strip():
|
|
|
33 |
except requests.exceptions.RequestException as e:
|
34 |
yield f"Error: {e}"
|
35 |
|
36 |
+
string = ''
|
37 |
+
for chunk in generate_response('hello!', stream=True):
|
38 |
+
string += chunk
|
39 |
+
|
40 |
# Button to trigger response
|
41 |
if st.button("Generate Response"):
|
42 |
if prompt.strip():
|