Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -79,9 +79,17 @@ def provide_advice(table_data: pd.DataFrame, hs_code: str, year: str, month: str
|
|
79 |
except Exception as e:
|
80 |
return f"خطا در تولید مشاوره: {e}"
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
# --- رابط کاربری سفارشی با Gradio Blocks ---
|
83 |
def create_custom_interface():
|
84 |
-
with gr.Blocks() as demo:
|
85 |
# عنوان برنامه
|
86 |
gr.Markdown("## تحلیل واردات بر اساس کد HS و ارائه مشاوره تخصصی")
|
87 |
|
@@ -104,7 +112,7 @@ def create_custom_interface():
|
|
104 |
|
105 |
# اتصال دکمهها به توابع
|
106 |
btn_show.click(
|
107 |
-
fn=get_imports,
|
108 |
inputs=[inp_hs, inp_year, inp_month],
|
109 |
outputs=[out_name, out_table]
|
110 |
)
|
|
|
79 |
except Exception as e:
|
80 |
return f"خطا در تولید مشاوره: {e}"
|
81 |
|
82 |
+
# --- CSS برای مخفی کردن هدر و فوتر ---
|
83 |
+
custom_css = """
|
84 |
+
.gradio-container .header { display: none !important; }
|
85 |
+
.gradio-container .footer { display: none !important; }
|
86 |
+
.footer { display: none !important; }
|
87 |
+
.header { display: none !important; }
|
88 |
+
"""
|
89 |
+
|
90 |
# --- رابط کاربری سفارشی با Gradio Blocks ---
|
91 |
def create_custom_interface():
|
92 |
+
with gr.Blocks(css=custom_css) as demo: # اضافه کردن CSS سفارشی
|
93 |
# عنوان برنامه
|
94 |
gr.Markdown("## تحلیل واردات بر اساس کد HS و ارائه مشاوره تخصصی")
|
95 |
|
|
|
112 |
|
113 |
# اتصال دکمهها به توابع
|
114 |
btn_show.click(
|
115 |
+
fn=get_imports,
|
116 |
inputs=[inp_hs, inp_year, inp_month],
|
117 |
outputs=[out_name, out_table]
|
118 |
)
|