Update app.py
Browse files
app.py
CHANGED
|
@@ -140,7 +140,6 @@ def analyze_text(text):
|
|
| 140 |
school_profile = school_profiles[best_school]["profile"]
|
| 141 |
timeline = school_profiles[best_school]["timeline"]
|
| 142 |
|
| 143 |
-
# روانشناسی
|
| 144 |
psych_results = psychological_analysis(text)
|
| 145 |
psych_output = ""
|
| 146 |
if psych_results:
|
|
@@ -166,7 +165,10 @@ with gr.Blocks(title="Philosophical Analyzer") as demo:
|
|
| 166 |
gr.Markdown("### 📈 Similarity Score:")
|
| 167 |
score = gr.Textbox()
|
| 168 |
|
| 169 |
-
gr.Markdown("### 🧬
|
|
|
|
|
|
|
|
|
|
| 170 |
psych_box = gr.Textbox()
|
| 171 |
|
| 172 |
gr.Markdown("### 🕰️ Philosophy Timeline")
|
|
@@ -178,7 +180,10 @@ with gr.Blocks(title="Philosophical Analyzer") as demo:
|
|
| 178 |
with gr.Column():
|
| 179 |
conceptual_map = gr.Plot(label="🧭 Conceptual Map")
|
| 180 |
|
| 181 |
-
submit_btn.click(
|
| 182 |
-
|
|
|
|
|
|
|
|
|
|
| 183 |
|
| 184 |
demo.launch()
|
|
|
|
| 140 |
school_profile = school_profiles[best_school]["profile"]
|
| 141 |
timeline = school_profiles[best_school]["timeline"]
|
| 142 |
|
|
|
|
| 143 |
psych_results = psychological_analysis(text)
|
| 144 |
psych_output = ""
|
| 145 |
if psych_results:
|
|
|
|
| 165 |
gr.Markdown("### 📈 Similarity Score:")
|
| 166 |
score = gr.Textbox()
|
| 167 |
|
| 168 |
+
gr.Markdown("### 🧬 School Profile:")
|
| 169 |
+
profile_box = gr.Textbox()
|
| 170 |
+
|
| 171 |
+
gr.Markdown("### 🧠 Psychological Profile:")
|
| 172 |
psych_box = gr.Textbox()
|
| 173 |
|
| 174 |
gr.Markdown("### 🕰️ Philosophy Timeline")
|
|
|
|
| 180 |
with gr.Column():
|
| 181 |
conceptual_map = gr.Plot(label="🧭 Conceptual Map")
|
| 182 |
|
| 183 |
+
submit_btn.click(
|
| 184 |
+
fn=analyze_text,
|
| 185 |
+
inputs=input_text,
|
| 186 |
+
outputs=[school, score, profile_box, timeline, best_quote, conceptual_map, psych_box]
|
| 187 |
+
)
|
| 188 |
|
| 189 |
demo.launch()
|