cahya commited on
Commit
030f8db
1 Parent(s): a9c9d9e

cut to User

Browse files
Files changed (1) hide show
  1. 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