Siddhant commited on
Commit
ab79be3
1 Parent(s): a0b5d57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -161,14 +161,14 @@ def transcribe(stream, new_chunk):
161
  temperature=0.0,
162
  do_sample=False,
163
  )
164
- if output.endswith((".", "?", "!", "<|end|>")):
165
- print(output)
166
- else:
167
- output=".".join(output.split(".")[:-1])+"."
168
 
169
  print("--- %s seconds ---" % (time.time() - start_time))
170
  generated_text = output[0]['generated_text'][-1]["content"]
171
- print(generated_text)
 
 
 
 
172
  # torch.mps.empty_cache()
173
 
174
  chat.append({"role": "assistant", "content": generated_text})
 
161
  temperature=0.0,
162
  do_sample=False,
163
  )
 
 
 
 
164
 
165
  print("--- %s seconds ---" % (time.time() - start_time))
166
  generated_text = output[0]['generated_text'][-1]["content"]
167
+ if generated_text.endswith((".", "?", "!", "<|end|>")):
168
+ print(generated_text)
169
+ else:
170
+ generated_text=".".join(generated_text.split(".")[:-1])+"."
171
+
172
  # torch.mps.empty_cache()
173
 
174
  chat.append({"role": "assistant", "content": generated_text})