ankankbhunia commited on
Commit
200d272
·
verified ·
1 Parent(s): 4ddb53b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -86,12 +86,12 @@ def generate_image(text,folder, _ch3, images):
86
  print ('ERROR! Try again.')
87
 
88
 
89
-
90
  # Define Gradio Interface
91
  iface = gr.Interface(
92
  fn=generate_image,
93
  inputs=[
94
- gr.Textbox(value = "In the quiet hum of everyday life, the dance of existence unfolds. Time, an ever-flowing river, carries the stories of triumph and heartache. Each fleeting moment is a brushstroke on the canvas of our memories.",label = "Input text"),
95
  gr.Dropdown(value = "files/example_data/style-30", choices=glob.glob('files/example_data/*'), label="Choose from provided writer styles"),
96
  gr.Markdown("### OR"),
97
  gr.File(label="Upload multiple word images", file_count="multiple")
@@ -100,7 +100,11 @@ iface = gr.Interface(
100
  gr.Image(type="pil", label="Style Image"),
101
  gr.Image(type="pil", label="Generated Image")],
102
  description = wellcomingMessage,
103
- thumbnail = "Handwriting Synthesis - Mimic anyone's handwriting!"
 
 
 
 
104
  )
105
 
106
  # Launch the Gradio Interface
 
86
  print ('ERROR! Try again.')
87
 
88
 
89
+ input_text_string = "In the quiet hum of everyday life, the dance of existence unfolds. Time, an ever-flowing river, carries the stories of triumph and heartache. Each fleeting moment is a brushstroke on the canvas of our memories."
90
  # Define Gradio Interface
91
  iface = gr.Interface(
92
  fn=generate_image,
93
  inputs=[
94
+ gr.Textbox(value = input_text_string, label = "Input text"),
95
  gr.Dropdown(value = "files/example_data/style-30", choices=glob.glob('files/example_data/*'), label="Choose from provided writer styles"),
96
  gr.Markdown("### OR"),
97
  gr.File(label="Upload multiple word images", file_count="multiple")
 
100
  gr.Image(type="pil", label="Style Image"),
101
  gr.Image(type="pil", label="Generated Image")],
102
  description = wellcomingMessage,
103
+ thumbnail = "Handwriting Synthesis - Mimic anyone's handwriting!",
104
+ examples = [["The sun dipped below the horizon, painting the sky in hues of orange and pink. A gentle breeze rustled the leaves, whispering secrets to the ancient trees. In that fleeting moment, nature's beauty spoke louder than words ever could.", 'files/example_data/style-30', None, None],
105
+ ["Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eget lectus eu ex iaculis tristique. Nullam vestibulum, odio vel tincidunt aliquet, sapien quam efficitur risus, nec hendrerit justo quam eget elit. Sed vel augue a lacus facilisis venenatis. ", 'files/example_data/style-31', None, None],
106
+ ["The sun dipped below the horizon, painting the sky in hues of orange and pink. A gentle breeze rustled the leaves, whispering secrets to the ancient trees. In that fleeting moment, nature's beauty spoke louder than words ever could.", None, None, glob.glob('files/example_data/style-1/*')],
107
+ ["Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eget lectus eu ex iaculis tristique. Nullam vestibulum, odio vel tincidunt aliquet, sapien quam efficitur risus, nec hendrerit justo quam eget elit. Sed vel augue a lacus facilisis venenatis. ", None, None, glob.glob('files/example_data/style-2/*')]]
108
  )
109
 
110
  # Launch the Gradio Interface