Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -233,6 +233,7 @@ with gr.Blocks(css=".gradio-button {background-color: #007bff; color: white;} .g
|
|
233 |
analyze_button = gr.Button("๋ถ์ ์์", elem_classes="gradio-button")
|
234 |
output_table = gr.DataFrame(label="๋ถ์ ๊ฒฐ๊ณผ (ํ
์ด๋ธ)")
|
235 |
csv_download = gr.File(label="์ถ์ฒ ๊ฒฐ๊ณผ ๋ค์ด๋ก๋", visible=False)
|
|
|
236 |
|
237 |
with gr.Column(scale=2, min_width=500):
|
238 |
gr.Markdown("<h3 style='color: #34495e;'>2. ๋ถ์ ๊ฒฐ๊ณผ ๋ฐ ์๊ฐํ</h3>")
|
@@ -244,15 +245,18 @@ with gr.Blocks(css=".gradio-button {background-color: #007bff; color: white;} .g
|
|
244 |
clear = gr.Button("๋ํ ๋ด์ญ ์ง์ฐ๊ธฐ")
|
245 |
|
246 |
# ๋ถ์ ๋ฒํผ ํด๋ฆญ ์ ํ
์ด๋ธ, ์ฐจํธ, ํ์ผ ๋ค์ด๋ก๋๋ฅผ ์
๋ฐ์ดํธ
|
247 |
-
analyze_button.click(
|
248 |
-
|
249 |
-
|
|
|
|
|
250 |
|
251 |
# CSV ๋ค์ด๋ก๋ ๋ฒํผ
|
252 |
-
|
253 |
|
254 |
# ์ฑํ
๊ธฐ๋ฅ
|
255 |
msg.submit(chat_response, [msg, chatbot], [chatbot])
|
256 |
clear.click(lambda: None, None, chatbot, queue=False)
|
257 |
|
|
|
258 |
demo.launch()
|
|
|
233 |
analyze_button = gr.Button("๋ถ์ ์์", elem_classes="gradio-button")
|
234 |
output_table = gr.DataFrame(label="๋ถ์ ๊ฒฐ๊ณผ (ํ
์ด๋ธ)")
|
235 |
csv_download = gr.File(label="์ถ์ฒ ๊ฒฐ๊ณผ ๋ค์ด๋ก๋", visible=False)
|
236 |
+
download_button = gr.Button("CSV ๋ค์ด๋ก๋", visible=False)
|
237 |
|
238 |
with gr.Column(scale=2, min_width=500):
|
239 |
gr.Markdown("<h3 style='color: #34495e;'>2. ๋ถ์ ๊ฒฐ๊ณผ ๋ฐ ์๊ฐํ</h3>")
|
|
|
245 |
clear = gr.Button("๋ํ ๋ด์ญ ์ง์ฐ๊ธฐ")
|
246 |
|
247 |
# ๋ถ์ ๋ฒํผ ํด๋ฆญ ์ ํ
์ด๋ธ, ์ฐจํธ, ํ์ผ ๋ค์ด๋ก๋๋ฅผ ์
๋ฐ์ดํธ
|
248 |
+
analyze_result = analyze_button.click(
|
249 |
+
hybrid_rag,
|
250 |
+
inputs=[employee_file, program_file, youtube_file, title_col, description_col, url_col, upload_date_col],
|
251 |
+
outputs=[output_table, chart_output, csv_download, download_button]
|
252 |
+
)
|
253 |
|
254 |
# CSV ๋ค์ด๋ก๋ ๋ฒํผ
|
255 |
+
download_button.click(download_csv, inputs=[], outputs=[csv_download])
|
256 |
|
257 |
# ์ฑํ
๊ธฐ๋ฅ
|
258 |
msg.submit(chat_response, [msg, chatbot], [chatbot])
|
259 |
clear.click(lambda: None, None, chatbot, queue=False)
|
260 |
|
261 |
+
# Gradio ์ธํฐํ์ด์ค ์คํ
|
262 |
demo.launch()
|