Spaces:
Runtime error
Runtime error
cut to User
Browse files- app/api.py +1 -0
app/api.py
CHANGED
@@ -132,6 +132,7 @@ async def text_generate(
|
|
132 |
time_diff = time_end - time_start
|
133 |
print(f"result:\n{result}")
|
134 |
generated_text = result[len(prompt)+1:]
|
|
|
135 |
return {"generated_text": generated_text, "processing_time": time_diff}
|
136 |
|
137 |
|
|
|
132 |
time_diff = time_end - time_start
|
133 |
print(f"result:\n{result}")
|
134 |
generated_text = result[len(prompt)+1:]
|
135 |
+
generated_text = generated_text[:generated_text.find("User:")]
|
136 |
return {"generated_text": generated_text, "processing_time": time_diff}
|
137 |
|
138 |
|