stupidog04 commited on
Commit
4c8f835
1 Parent(s): 470a33b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -195,19 +195,18 @@ def inference(video, lang, full_scan, number_filter, use_trocr, time_step, perio
195
  df_list.append({"Box": f"", "Time (s)": "", "Text": ""})
196
  df = pd.concat([pd.DataFrame(df_list)])
197
 
198
- # # Convert the Matplotlib plot to a NumPy array
199
- # plot_fig = plot_temporal_profile(temporal_profiles)
200
- # buf = io.BytesIO()
201
- # plot_fig.savefig(buf, format='png')
202
- # buf.seek(0)
203
- # # Convert the resized image to a NumPy array
204
- # plot_np = np.array(PIL.Image.open(buf))
205
 
206
- # # Close the buffer
207
- # buf.close()
208
 
209
- # return output, im, plot_np, df # Change this line
210
- return output, im, im, df # Change this line
211
 
212
 
213
  title = '🖼️Video to Multilingual OCR👁️Gradio'
 
195
  df_list.append({"Box": f"", "Time (s)": "", "Text": ""})
196
  df = pd.concat([pd.DataFrame(df_list)])
197
 
198
+ # Convert the Matplotlib plot to a NumPy array
199
+ plot_fig = plot_temporal_profile(temporal_profiles)
200
+ buf = io.BytesIO()
201
+ plot_fig.savefig(buf, format='png')
202
+ buf.seek(0)
203
+ # Convert the resized image to a NumPy array
204
+ plot_np = np.array(PIL.Image.open(buf))
205
 
206
+ # Close the buffer
207
+ buf.close()
208
 
209
+ return output, im, plot_np, df # Change this line
 
210
 
211
 
212
  title = '🖼️Video to Multilingual OCR👁️Gradio'