Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -40,14 +40,9 @@ def chat_inf(system_prompt,prompt,history):
|
|
40 |
|
41 |
for response in stream:
|
42 |
output += response.token.text
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
else:
|
47 |
-
hist=[(prompt,output)]
|
48 |
-
yield hist
|
49 |
-
|
50 |
-
|
51 |
|
52 |
def get_screenshot(chat: list,height=5000,width=600,chatblock=[1],theme="light",wait=3000,header=True):
|
53 |
result = ss_client.predict(str(chat),height,width,[chatblock],header,theme,wait,api_name="/run_script")
|
|
|
40 |
|
41 |
for response in stream:
|
42 |
output += response.token.text
|
43 |
+
yield [(prompt,output)]
|
44 |
+
history.append(prompt,output)
|
45 |
+
yield history
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
def get_screenshot(chat: list,height=5000,width=600,chatblock=[1],theme="light",wait=3000,header=True):
|
48 |
result = ss_client.predict(str(chat),height,width,[chatblock],header,theme,wait,api_name="/run_script")
|