Shirjannn commited on
Commit
60fadd4
·
verified ·
1 Parent(s): d201fad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -16
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
- with gr.Column():
163
- gr.Markdown("### 🧠 Philosophical School Detected:")
164
- school = gr.Textbox()
 
165
 
166
- gr.Markdown("### 📈 Similarity Score:")
167
- score = gr.Textbox()
168
 
169
- gr.Markdown("### 🧬 Psychological Profile:")
170
- profile = gr.Textbox()
171
 
172
- gr.Markdown("### 🕰️ Philosophy Timeline")
173
- timeline = gr.Textbox()
174
 
175
- with gr.Accordion("🧾 Most Similar Reference Quote", open=False):
176
- best_quote = gr.Textbox()
177
 
178
- with gr.Column():
179
- conceptual_map = gr.Plot(label="🧭 Conceptual Map")
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()