Spaces:
Sleeping
Sleeping
OjciecTadeusz
commited on
Commit
•
8d5e1fd
1
Parent(s):
b4bd245
Update main.py
Browse files
main.py
CHANGED
@@ -45,8 +45,8 @@ def generate(item: Item):
|
|
45 |
stream = client.text_generation(
|
46 |
formatted_prompt,
|
47 |
**generate_kwargs,
|
48 |
-
stream=item.stream,
|
49 |
-
|
50 |
details=item.details,
|
51 |
return_full_text=item.return_full_text
|
52 |
)
|
@@ -56,8 +56,8 @@ def generate(item: Item):
|
|
56 |
# for response in stream:
|
57 |
# Check if response has the attribute 'token'
|
58 |
|
59 |
-
# if hasattr(response, '
|
60 |
-
# output += response.
|
61 |
# else:
|
62 |
# output += response # If not, treat it as a string
|
63 |
# return output
|
|
|
45 |
stream = client.text_generation(
|
46 |
formatted_prompt,
|
47 |
**generate_kwargs,
|
48 |
+
# stream=item.stream,
|
49 |
+
stream=False,
|
50 |
details=item.details,
|
51 |
return_full_text=item.return_full_text
|
52 |
)
|
|
|
56 |
# for response in stream:
|
57 |
# Check if response has the attribute 'token'
|
58 |
|
59 |
+
# if hasattr(response, 'tokens'):
|
60 |
+
# output += response.tokens.text
|
61 |
# else:
|
62 |
# output += response # If not, treat it as a string
|
63 |
# return output
|