arxivgpt kim commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,25 +63,30 @@ def predict(inputs):
|
|
| 63 |
return f"<div style='color: red;'>μ€λ₯κ° λ°μνμ΅λλ€. μν μ½λ: {response.status_code}</div>"
|
| 64 |
|
| 65 |
|
|
|
|
| 66 |
css = """
|
| 67 |
footer {
|
| 68 |
visibility: hidden;
|
| 69 |
}
|
| 70 |
"""
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
| 79 |
|
| 80 |
submit_button.click(
|
| 81 |
fn=predict,
|
| 82 |
inputs=text_input,
|
| 83 |
-
outputs=
|
| 84 |
)
|
| 85 |
|
| 86 |
# μΈν°νμ΄μ€ μ€ν
|
| 87 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
| 63 |
return f"<div style='color: red;'>μ€λ₯κ° λ°μνμ΅λλ€. μν μ½λ: {response.status_code}</div>"
|
| 64 |
|
| 65 |
|
| 66 |
+
|
| 67 |
css = """
|
| 68 |
footer {
|
| 69 |
visibility: hidden;
|
| 70 |
}
|
| 71 |
"""
|
| 72 |
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
# gr.Blocksλ₯Ό μ¬μ©νμ¬ λ μ΄μμμ ꡬμ±ν©λλ€.
|
| 76 |
+
with gr.Blocks() as demo:
|
| 77 |
+
with gr.Row():
|
| 78 |
+
text_input = gr.Textbox(label="λ©μμ§λ₯Ό μ
λ ₯νμΈμ...", placeholder="μ¬κΈ°μ μ
λ ₯νμΈμ...")
|
| 79 |
+
with gr.Row():
|
| 80 |
+
submit_button = gr.Button("μ μ‘")
|
| 81 |
+
output_html = gr.HTML(label="AI μλ΅")
|
| 82 |
|
| 83 |
submit_button.click(
|
| 84 |
fn=predict,
|
| 85 |
inputs=text_input,
|
| 86 |
+
outputs=output_html
|
| 87 |
)
|
| 88 |
|
| 89 |
# μΈν°νμ΄μ€ μ€ν
|
| 90 |
+
demo.launch()
|
| 91 |
+
|
| 92 |
+
|