JUNGU commited on
Commit
6838288
ยท
verified ยท
1 Parent(s): fff891e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -50,13 +50,25 @@ def extract_and_summarize(image):
50
 
51
  return summary
52
 
 
 
 
 
 
 
 
 
 
 
 
53
  # Define Gradio interface
54
  iface = gr.Interface(
55
  fn=extract_and_summarize,
56
  inputs=gr.Image(type="pil", label="Upload Document Image"),
57
  outputs=gr.Textbox(label="Summarized Text"),
58
  title="๊ณต๋ฌธ์„œ ์š”์•ฝ ์ƒ์„ฑ๊ธฐ",
59
- description="๋ฌธ์„œ์˜ ํ™”๋ฉด์„ ์บก์ณํ•˜์—ฌ ์—…๋กœ๋“œํ•˜๋ฉด ์š”์•ฝํ•ด์ค๋‹ˆ๋‹ค."
 
60
  )
61
 
62
  # Launch the interface
 
50
 
51
  return summary
52
 
53
+ # ์ƒ˜ํ”Œ ๋ฌธ์„œ ์ด๋ฏธ์ง€ ์ถ”๊ฐ€
54
+
55
+ sample_images = [
56
+ "/sample1.png",
57
+ "/sample2.png",
58
+ "/sample3.png"
59
+ ]
60
+
61
+ # ์ƒ˜ํ”Œ ์ด๋ฏธ์ง€๋ฅผ ์œ„ํ•œ ๊ฒฝ๋กœ
62
+ example_images = [[image_path] for image_path in sample_images]
63
+
64
  # Define Gradio interface
65
  iface = gr.Interface(
66
  fn=extract_and_summarize,
67
  inputs=gr.Image(type="pil", label="Upload Document Image"),
68
  outputs=gr.Textbox(label="Summarized Text"),
69
  title="๊ณต๋ฌธ์„œ ์š”์•ฝ ์ƒ์„ฑ๊ธฐ",
70
+ description="๋ฌธ์„œ์˜ ํ™”๋ฉด์„ ์บก์ณํ•˜์—ฌ ์—…๋กœ๋“œํ•˜๋ฉด ์š”์•ฝํ•ด์ค๋‹ˆ๋‹ค.",
71
+ examples=example_images
72
  )
73
 
74
  # Launch the interface