Update app.py
Browse files
app.py
CHANGED
@@ -73,13 +73,13 @@ def generate(
|
|
73 |
prompt = prompt.replace(image, image_description)
|
74 |
print(prompt)
|
75 |
formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history, custom_prompt)
|
76 |
-
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=
|
77 |
output = ""
|
78 |
-
|
79 |
for response in stream:
|
80 |
output += response.token.text
|
81 |
-
yield output
|
82 |
-
|
|
|
83 |
|
84 |
|
85 |
additional_inputs=[
|
|
|
73 |
prompt = prompt.replace(image, image_description)
|
74 |
print(prompt)
|
75 |
formatted_prompt = format_prompt(f"{system_prompt}, {prompt}", history, custom_prompt)
|
76 |
+
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=True)
|
77 |
output = ""
|
|
|
78 |
for response in stream:
|
79 |
output += response.token.text
|
80 |
+
yield [(prompt,output)]
|
81 |
+
history.append((prompt,output))
|
82 |
+
yield history
|
83 |
|
84 |
|
85 |
additional_inputs=[
|