Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import base64
|
|
5 |
|
6 |
# Mathpix์ ์ด๋ฏธ์ง ํ์ผ์ ๋ณด๋ด์ด LaTeX ๋ฌธ์์ด์ ์ถ์ถํ๋ ํจ์
|
7 |
def get_latex_from_image(image):
|
|
|
8 |
image_base64 = base64.b64encode(image).decode('utf-8')
|
9 |
|
10 |
# Mathpix API ์์ฒญ ํค๋
|
@@ -34,7 +35,7 @@ def get_latex_from_image(image):
|
|
34 |
def build_gradio_app():
|
35 |
with gr.Blocks() as app:
|
36 |
with gr.Row():
|
37 |
-
image_input = gr.Image(type="
|
38 |
submit_button = gr.Button("๋ณํํ๊ธฐ")
|
39 |
latex_output = gr.Textbox(label="์ถ์ถ๋ LaTeX")
|
40 |
|
|
|
5 |
|
6 |
# Mathpix์ ์ด๋ฏธ์ง ํ์ผ์ ๋ณด๋ด์ด LaTeX ๋ฌธ์์ด์ ์ถ์ถํ๋ ํจ์
|
7 |
def get_latex_from_image(image):
|
8 |
+
# ์ด๋ฏธ์ง ํ์ผ์ base64 ์ธ์ฝ๋ฉ
|
9 |
image_base64 = base64.b64encode(image).decode('utf-8')
|
10 |
|
11 |
# Mathpix API ์์ฒญ ํค๋
|
|
|
35 |
def build_gradio_app():
|
36 |
with gr.Blocks() as app:
|
37 |
with gr.Row():
|
38 |
+
image_input = gr.Image(type="filepath", label="์ด๋ฏธ์ง ์
๋ก๋")
|
39 |
submit_button = gr.Button("๋ณํํ๊ธฐ")
|
40 |
latex_output = gr.Textbox(label="์ถ์ถ๋ LaTeX")
|
41 |
|