Spaces:
Running
Running
Update app.py
Browse files
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
|