fthor commited on
Commit
dacd4b7
·
1 Parent(s): 04cc061

print output in gradio box

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -28,9 +28,9 @@ def text_to_image(image, prompt):
28
  output = model.generate(**inputs, max_new_tokens=100)
29
  generated_text = processor.batch_decode(output, skip_special_tokens=True)
30
  for text in generated_text:
31
- print(text.split("ASSISTANT:")[-1])
 
32
 
33
- print()
34
  demo = gr.Interface(
35
  fn=text_to_image,
36
  inputs=[
 
28
  output = model.generate(**inputs, max_new_tokens=100)
29
  generated_text = processor.batch_decode(output, skip_special_tokens=True)
30
  for text in generated_text:
31
+ return text.split("ASSISTANT:")[-1]
32
+
33
 
 
34
  demo = gr.Interface(
35
  fn=text_to_image,
36
  inputs=[