Jacek Zadrożny
commited on
Commit
·
009fbd9
1
Parent(s):
0dc23a4
Włączenie share w Gradio i serializacja JSON
Browse files
app.py
CHANGED
@@ -124,7 +124,7 @@ def analyze_job_ad(job_ad, file):
|
|
124 |
output_df = pd.concat([output_df, pd.DataFrame([new_row])], ignore_index=True)
|
125 |
|
126 |
word_file_path = create_report(output_df)
|
127 |
-
json_output =
|
128 |
return json_output, word_file_path
|
129 |
|
130 |
# Interfejs Gradio
|
@@ -133,4 +133,4 @@ demo = gr.Interface(
|
|
133 |
inputs=[gr.TextArea(label="Ogłoszenie (opcjonalnie)"), gr.File(label="Plik PDF lub DOCX")],
|
134 |
outputs=[gr.JSON(label="Wyniki analizy"), gr.File(label="Pobierz raport w formacie Word")],
|
135 |
title="KoREKtor – analiza ogłoszenia",
|
136 |
-
).launch(inbrowser=True)
|
|
|
124 |
output_df = pd.concat([output_df, pd.DataFrame([new_row])], ignore_index=True)
|
125 |
|
126 |
word_file_path = create_report(output_df)
|
127 |
+
json_output = output_df.to_dict(orient="records")
|
128 |
return json_output, word_file_path
|
129 |
|
130 |
# Interfejs Gradio
|
|
|
133 |
inputs=[gr.TextArea(label="Ogłoszenie (opcjonalnie)"), gr.File(label="Plik PDF lub DOCX")],
|
134 |
outputs=[gr.JSON(label="Wyniki analizy"), gr.File(label="Pobierz raport w formacie Word")],
|
135 |
title="KoREKtor – analiza ogłoszenia",
|
136 |
+
).launch(inbrowser=True, share=True)
|