Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -41,11 +41,12 @@ def generate(item: Item):
|
|
| 41 |
)
|
| 42 |
|
| 43 |
formatted_prompt = format_prompt(f"{item.system_prompt}, {item.prompt}", item.history)
|
|
|
|
| 44 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
| 45 |
output = ""
|
| 46 |
|
| 47 |
for response in stream:
|
| 48 |
-
print(response.token.text)
|
| 49 |
output += response.token.text
|
| 50 |
return output
|
| 51 |
|
|
|
|
| 41 |
)
|
| 42 |
|
| 43 |
formatted_prompt = format_prompt(f"{item.system_prompt}, {item.prompt}", item.history)
|
| 44 |
+
print(formatted_prompt)
|
| 45 |
stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
| 46 |
output = ""
|
| 47 |
|
| 48 |
for response in stream:
|
| 49 |
+
#print(response.token.text)
|
| 50 |
output += response.token.text
|
| 51 |
return output
|
| 52 |
|