Update app.py
Browse files
app.py
CHANGED
|
@@ -159,26 +159,25 @@ with gr.Blocks(title="Philosophical Analyzer") as demo:
|
|
| 159 |
submit_btn = gr.Button("Analyze")
|
| 160 |
|
| 161 |
with gr.Row():
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
|
|
|
| 165 |
|
| 166 |
-
|
| 167 |
-
|
| 168 |
|
| 169 |
-
|
| 170 |
-
|
| 171 |
|
| 172 |
-
|
| 173 |
-
|
| 174 |
|
| 175 |
-
|
| 176 |
-
|
| 177 |
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
submit_btn.click(fn=analyze_text, inputs=input_text,
|
| 182 |
-
outputs=[school, score, profile, timeline, best_quote, conceptual_map, profile])
|
| 183 |
|
| 184 |
demo.launch()
|
|
|
|
| 159 |
submit_btn = gr.Button("Analyze")
|
| 160 |
|
| 161 |
with gr.Row():
|
| 162 |
+
# تغییر در UI
|
| 163 |
+
with gr.Column():
|
| 164 |
+
gr.Markdown("### 🧠 Philosophical School Detected:")
|
| 165 |
+
school = gr.Textbox()
|
| 166 |
|
| 167 |
+
gr.Markdown("### 📈 Similarity Score:")
|
| 168 |
+
score = gr.Textbox()
|
| 169 |
|
| 170 |
+
gr.Markdown("### 🧬 Psychological Profile:")
|
| 171 |
+
psych_box = gr.Textbox() # نام جدید برای جلوگیری از تداخل
|
| 172 |
|
| 173 |
+
gr.Markdown("### 🕰️ Philosophy Timeline")
|
| 174 |
+
timeline = gr.Textbox()
|
| 175 |
|
| 176 |
+
with gr.Accordion("🧾 Most Similar Reference Quote", open=False):
|
| 177 |
+
best_quote = gr.Textbox()
|
| 178 |
|
| 179 |
+
# تغییر در کلیک باتن
|
| 180 |
+
submit_btn.click(fn=analyze_text, inputs=input_text,
|
| 181 |
+
outputs=[school, score, profile, timeline, best_quote, conceptual_map, psych_box])
|
|
|
|
|
|
|
| 182 |
|
| 183 |
demo.launch()
|