Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -40,16 +40,16 @@ def generate_text(request: Request, prompt: str = Body()):
|
|
40 |
repetition_penalty=repetition_penalty,
|
41 |
do_sample=True,
|
42 |
seed=random.randint(0, 10**7),
|
43 |
-
stream=
|
44 |
details=True,
|
45 |
-
return_full_text=
|
46 |
)
|
47 |
-
output = ""
|
48 |
|
49 |
-
for response in stream:
|
50 |
-
|
51 |
-
|
52 |
|
53 |
-
return output[len(output) - 1]
|
54 |
|
55 |
-
|
|
|
40 |
repetition_penalty=repetition_penalty,
|
41 |
do_sample=True,
|
42 |
seed=random.randint(0, 10**7),
|
43 |
+
stream=False,
|
44 |
details=True,
|
45 |
+
return_full_text=True
|
46 |
)
|
47 |
+
# output = ""
|
48 |
|
49 |
+
# for response in stream:
|
50 |
+
# output += response.token.text
|
51 |
+
# yield output
|
52 |
|
53 |
+
# return output[len(output) - 1]
|
54 |
|
55 |
+
return stream
|