Amir Zait commited on
Commit
23dd537
1 Parent(s): 6bf1f19
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -43,7 +43,7 @@ def generate_image(text):
43
  cond_scale = 3.0
44
 
45
  encoded_images = model.generate(
46
- tokenized_prompt,
47
  random.randint(0, 1e7),
48
  model.params,
49
  gen_top_k,
@@ -76,9 +76,13 @@ def parse_transcription(wav_file):
76
  predicted_ids = torch.argmax(logits, dim=-1)
77
  transcription = asr_processor.decode(predicted_ids[0], skip_special_tokens=True)
78
 
 
 
79
  # translate to english
80
  translated = he_en_translator(transcription)[0]['translation_text']
81
 
 
 
82
  # generate image
83
  image = generate_image(translated)
84
  return image
 
43
  cond_scale = 3.0
44
 
45
  encoded_images = model.generate(
46
+ **tokenized_prompt,
47
  random.randint(0, 1e7),
48
  model.params,
49
  gen_top_k,
 
76
  predicted_ids = torch.argmax(logits, dim=-1)
77
  transcription = asr_processor.decode(predicted_ids[0], skip_special_tokens=True)
78
 
79
+ print(transcription)
80
+
81
  # translate to english
82
  translated = he_en_translator(transcription)[0]['translation_text']
83
 
84
+ print(translated)
85
+
86
  # generate image
87
  image = generate_image(translated)
88
  return image