Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1841,7 +1841,7 @@ def process_single_ingredient(
|
|
| 1841 |
f"- μ ν κ΅κ° μ: {len(countries)}κ°\n"
|
| 1842 |
f"- MFDS μν: {mfds_live_msg}\n"
|
| 1843 |
f"- MFDS μ‘°ν λμ: {', '.join(terms) if terms else 'μμ'}\n"
|
| 1844 |
-
"- νμ λ°©μ: GPT νμ μμ,
|
| 1845 |
"- κΈμ§ μ±λΆ: ν¨λ μ 무μ 무κ΄νκ² λ°°ν©κΈμ§ μ°μ νμ\n"
|
| 1846 |
)
|
| 1847 |
return result_df, msg
|
|
@@ -1876,7 +1876,6 @@ with gr.Blocks(css=custom_css) as demo:
|
|
| 1876 |
with gr.Tab("π λ¨μΌ μ±λΆ κ²μ"):
|
| 1877 |
single_country=gr.CheckboxGroup(choices=get_country_folders(),value=[],label="π κ²μ κ΅κ° / μ±λ μ ν",elem_id="single_country_checks")
|
| 1878 |
single_refresh=gr.Button("π κ΅κ°/κ·μ νμΌ μλ‘κ³ μΉ¨")
|
| 1879 |
-
single_warmup_btn=gr.Button("β‘ λ¨μΌκ²μ μΊμ 미리 λ§λ€κΈ°")
|
| 1880 |
single_query=gr.Textbox(label="κ²μμ΄",placeholder="μ: νΈλͺ¨μ΄λ μ΄νΈ / Homosalate / 118-56-9 / νΈλΌλ₯μ¬λ―Ήμ μ¨λ")
|
| 1881 |
with gr.Row():
|
| 1882 |
single_amount=gr.Textbox(label="ν¨λ %(w/w) μ ν μ
λ ₯",placeholder="μ: 7.2")
|
|
@@ -1885,7 +1884,6 @@ with gr.Blocks(css=custom_css) as demo:
|
|
| 1885 |
single_btn=gr.Button("π λ¨μΌ μ±λΆ κ²μ μμ",variant="primary")
|
| 1886 |
single_df_out=gr.Dataframe(label="λ¨μΌ μ±λΆ κ²μ κ²°κ³Ό",wrap=True,interactive=False)
|
| 1887 |
single_msg_out=gr.Textbox(label="κ²μ μν / λ©μμ§",interactive=False,lines=8)
|
| 1888 |
-
single_warmup_btn.click(warmup_country_indexes,inputs=single_country,outputs=single_msg_out)
|
| 1889 |
single_refresh.click(refresh_country_choices_and_clear_cache,inputs=single_country,outputs=single_country)
|
| 1890 |
single_btn.click(process_single_ingredient,inputs=[single_country,single_query,single_amount,single_function,single_use_mfds_live],outputs=[single_df_out,single_msg_out])
|
| 1891 |
|
|
|
|
| 1841 |
f"- μ ν κ΅κ° μ: {len(countries)}κ°\n"
|
| 1842 |
f"- MFDS μν: {mfds_live_msg}\n"
|
| 1843 |
f"- MFDS μ‘°ν λμ: {', '.join(terms) if terms else 'μμ'}\n"
|
| 1844 |
+
"- νμ λ°©μ: GPT νμ μμ, κ΅κ°λ³ νμΌ μλ μΊμ κ²μ + μμ½μ² μ²΄ν¬ ON μ μ€μκ° κ²°κ³Ό μ¬μ©\n"
|
| 1845 |
"- κΈμ§ μ±λΆ: ν¨λ μ 무μ 무κ΄νκ² λ°°ν©κΈμ§ μ°μ νμ\n"
|
| 1846 |
)
|
| 1847 |
return result_df, msg
|
|
|
|
| 1876 |
with gr.Tab("π λ¨μΌ μ±λΆ κ²μ"):
|
| 1877 |
single_country=gr.CheckboxGroup(choices=get_country_folders(),value=[],label="π κ²μ κ΅κ° / μ±λ μ ν",elem_id="single_country_checks")
|
| 1878 |
single_refresh=gr.Button("π κ΅κ°/κ·μ νμΌ μλ‘κ³ μΉ¨")
|
|
|
|
| 1879 |
single_query=gr.Textbox(label="κ²μμ΄",placeholder="μ: νΈλͺ¨μ΄λ μ΄νΈ / Homosalate / 118-56-9 / νΈλΌλ₯μ¬λ―Ήμ μ¨λ")
|
| 1880 |
with gr.Row():
|
| 1881 |
single_amount=gr.Textbox(label="ν¨λ %(w/w) μ ν μ
λ ₯",placeholder="μ: 7.2")
|
|
|
|
| 1884 |
single_btn=gr.Button("π λ¨μΌ μ±λΆ κ²μ μμ",variant="primary")
|
| 1885 |
single_df_out=gr.Dataframe(label="λ¨μΌ μ±λΆ κ²μ κ²°κ³Ό",wrap=True,interactive=False)
|
| 1886 |
single_msg_out=gr.Textbox(label="κ²μ μν / λ©μμ§",interactive=False,lines=8)
|
|
|
|
| 1887 |
single_refresh.click(refresh_country_choices_and_clear_cache,inputs=single_country,outputs=single_country)
|
| 1888 |
single_btn.click(process_single_ingredient,inputs=[single_country,single_query,single_amount,single_function,single_use_mfds_live],outputs=[single_df_out,single_msg_out])
|
| 1889 |
|