Iker commited on
Commit
cb931f6
1 Parent(s): 518ecc9
Files changed (1) hide show
  1. app_zero.py +3 -3
app_zero.py CHANGED
@@ -149,7 +149,7 @@ def run_model(mode, title, text):
149
  logits_processor=stop_criteria,
150
  )
151
 
152
- yield streamer
153
 
154
  temp = tokenizer.batch_decode(
155
  model_output[:, model_inputs["input_ids"].shape[-1] :],
@@ -223,8 +223,8 @@ def generate_text(
223
  progress(0.5, desc="🤖 Leyendo noticia")
224
 
225
  try:
226
- for temp in run_model(mode, title, text):
227
- yield title, temp, text
228
 
229
  except Exception as e:
230
  print(e)
 
149
  logits_processor=stop_criteria,
150
  )
151
 
152
+ # yield streamer # Does not work properly on Zero environment
153
 
154
  temp = tokenizer.batch_decode(
155
  model_output[:, model_inputs["input_ids"].shape[-1] :],
 
223
  progress(0.5, desc="🤖 Leyendo noticia")
224
 
225
  try:
226
+ temp = run_model(mode, title, text):
227
+
228
 
229
  except Exception as e:
230
  print(e)