Add Py Prolog Files
Browse files
app.py
CHANGED
|
@@ -68,17 +68,17 @@ def format_result(res):
|
|
| 68 |
# =========================
|
| 69 |
import gradio as gr
|
| 70 |
|
| 71 |
-
with gr.Blocks() as app:
|
| 72 |
|
| 73 |
# ===== Top Markdown (centralized) =====
|
| 74 |
gr.Markdown(
|
| 75 |
"""
|
| 76 |
-
<div style="text-align:center">
|
| 77 |
-
|
| 78 |
-
|
| 79 |
Charger un fichier `.pl`, puis exécuter des requêtes comme en Prolog.
|
| 80 |
</div>
|
| 81 |
-
""",
|
| 82 |
elem_id="top-markdown"
|
| 83 |
)
|
| 84 |
|
|
@@ -126,41 +126,3 @@ app.launch(
|
|
| 126 |
debug=True
|
| 127 |
)
|
| 128 |
|
| 129 |
-
# # =========================
|
| 130 |
-
# # 🎨 Interface moderne
|
| 131 |
-
# # =========================
|
| 132 |
-
# with gr.Blocks(theme=gr.themes.Soft(), title="Py-Prolog") as app:
|
| 133 |
-
|
| 134 |
-
# gr.Markdown("""
|
| 135 |
-
# # 🧠 Py-Prolog
|
| 136 |
-
# ### Mini SWI-Prolog en Python (Powered by PySwip)
|
| 137 |
-
|
| 138 |
-
# Charger un fichier `.pl`, puis exécuter des requêtes comme en Prolog.
|
| 139 |
-
# """)
|
| 140 |
-
|
| 141 |
-
# with gr.Row():
|
| 142 |
-
# file_input = gr.File(label="📂 Charger fichier Prolog (.pl)")
|
| 143 |
-
# load_btn = gr.Button("⚡ Charger", variant="primary")
|
| 144 |
-
|
| 145 |
-
# status = gr.Textbox(label="📢 Etat", interactive=False)
|
| 146 |
-
|
| 147 |
-
# load_btn.click(load_file, inputs=file_input, outputs=status)
|
| 148 |
-
|
| 149 |
-
# gr.Markdown("## 💻 Terminal Prolog")
|
| 150 |
-
|
| 151 |
-
# query_input = gr.Textbox(
|
| 152 |
-
# label="Requête",
|
| 153 |
-
# placeholder="Ex: grand_pere(X,dudulle)."
|
| 154 |
-
# )
|
| 155 |
-
|
| 156 |
-
# with gr.Row():
|
| 157 |
-
# run_btn = gr.Button("▶ Exécuter", variant="primary")
|
| 158 |
-
# next_btn = gr.Button("➡ Next ( ; )")
|
| 159 |
-
|
| 160 |
-
# output = gr.Textbox(label="Résultat", lines=5)
|
| 161 |
-
|
| 162 |
-
# run_btn.click(run_query, inputs=query_input, outputs=output)
|
| 163 |
-
# next_btn.click(next_solution, outputs=output)
|
| 164 |
-
|
| 165 |
-
# # 🔥 IMPORTANT (évite erreurs asyncio)
|
| 166 |
-
# app.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 68 |
# =========================
|
| 69 |
import gradio as gr
|
| 70 |
|
| 71 |
+
with gr.Blocks(title="Py-Prolog") as app:
|
| 72 |
|
| 73 |
# ===== Top Markdown (centralized) =====
|
| 74 |
gr.Markdown(
|
| 75 |
"""
|
| 76 |
+
<div style="text-align:center; margin-top:20px; color:gray;">
|
| 77 |
+
🧠 Py-Prolog
|
| 78 |
+
Mini SWI-Prolog en Python (Powered by PySwip)
|
| 79 |
Charger un fichier `.pl`, puis exécuter des requêtes comme en Prolog.
|
| 80 |
</div>
|
| 81 |
+
""",
|
| 82 |
elem_id="top-markdown"
|
| 83 |
)
|
| 84 |
|
|
|
|
| 126 |
debug=True
|
| 127 |
)
|
| 128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|