pelinbalci commited on
Commit
f58179a
1 Parent(s): e1b0e11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -33,15 +33,12 @@ if file is not None:
33
  pred_confidence = result[idx][2]
34
  textdic_easyocr[pred_text] = {}
35
  textdic_easyocr[pred_text]['pred_confidence'] = pred_confidence
36
-
 
37
  df = pd.DataFrame.from_dict(textdic_easyocr).T
38
-
39
  st.table(df)
40
 
41
-
42
- ax1.plot(agg_df.year, agg_df.rating)
43
- st.pyplot(fig1)
44
-
45
  for res in result:
46
  top_left = tuple(res[0][0]) # top left coordinates as tuple
47
  bottom_right = tuple(res[0][2]) # bottom right coordinates as tuple
 
33
  pred_confidence = result[idx][2]
34
  textdic_easyocr[pred_text] = {}
35
  textdic_easyocr[pred_text]['pred_confidence'] = pred_confidence
36
+
37
+ # create a dataframe which shows the predicted text and prediction confidence
38
  df = pd.DataFrame.from_dict(textdic_easyocr).T
 
39
  st.table(df)
40
 
41
+ # Plot image with text box and predicted text
 
 
 
42
  for res in result:
43
  top_left = tuple(res[0][0]) # top left coordinates as tuple
44
  bottom_right = tuple(res[0][2]) # bottom right coordinates as tuple