Charlie Li commited on
Commit
fc90453
1 Parent(s): c5cb9ba

minor tweaks.

Browse files
Files changed (2) hide show
  1. app.py +7 -4
  2. utils.py +1 -0
app.py CHANGED
@@ -108,16 +108,19 @@ with gr.Blocks() as app:
108
  ["Image", "Image+Video"], label="Output Format", value="Image"
109
  )
110
  im = gr.Image(label="Input Image")
 
 
 
 
 
 
111
  with gr.Row():
112
  d_t_text = gr.Textbox(
113
  label="OCR recognition input to the model", interactive=False
114
  )
115
  r_d_text = gr.Textbox(label="Recognition from the model", interactive=False)
116
  vanilla_text = gr.Textbox(label="Vanilla", interactive=False)
117
- with gr.Row():
118
- d_t_img = gr.Image(label="Derender with Text")
119
- r_d_img = gr.Image(label="Recognize and Derender")
120
- vanilla_img = gr.Image(label="Vanilla")
121
  with gr.Row():
122
  d_t_vid = gr.Video(label="Derender with Text", autoplay=True)
123
  r_d_vid = gr.Video(label="Recognize and Derender", autoplay=True)
 
108
  ["Image", "Image+Video"], label="Output Format", value="Image"
109
  )
110
  im = gr.Image(label="Input Image")
111
+
112
+ with gr.Row():
113
+ d_t_img = gr.Image(label="Derender with Text")
114
+ r_d_img = gr.Image(label="Recognize and Derender")
115
+ vanilla_img = gr.Image(label="Vanilla")
116
+
117
  with gr.Row():
118
  d_t_text = gr.Textbox(
119
  label="OCR recognition input to the model", interactive=False
120
  )
121
  r_d_text = gr.Textbox(label="Recognition from the model", interactive=False)
122
  vanilla_text = gr.Textbox(label="Vanilla", interactive=False)
123
+
 
 
 
124
  with gr.Row():
125
  d_t_vid = gr.Video(label="Derender with Text", autoplay=True)
126
  r_d_vid = gr.Video(label="Recognize and Derender", autoplay=True)
utils.py CHANGED
@@ -165,6 +165,7 @@ def plot_ink_to_video(
165
 
166
  ani = FuncAnimation(fig, update, frames=all_points + 1, blit=False)
167
  Writer = FFMpegWriter(fps=fps)
 
168
  ani.save(output_name, writer=Writer)
169
  plt.close(fig)
170
 
 
165
 
166
  ani = FuncAnimation(fig, update, frames=all_points + 1, blit=False)
167
  Writer = FFMpegWriter(fps=fps)
168
+ plt.tight_layout()
169
  ani.save(output_name, writer=Writer)
170
  plt.close(fig)
171