Spaces:
Sleeping
Sleeping
Merwan6
commited on
Commit
·
7ae005b
1
Parent(s):
716abff
Ajout du fichier app.yaml et mise à jour du code + README
Browse files
app.py
CHANGED
|
@@ -6,7 +6,10 @@ from scripts.inference import (
|
|
| 6 |
base_model_inference,
|
| 7 |
fine_tuned_inference
|
| 8 |
)
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
def predict_with_model(text, model_type):
|
| 12 |
"""
|
|
@@ -77,7 +80,7 @@ with gr.Blocks(title="Classification AG News (4 stratégies)") as app:
|
|
| 77 |
)
|
| 78 |
|
| 79 |
with gr.Tab("📄 Documentation"):
|
| 80 |
-
gr.Markdown(
|
| 81 |
|
| 82 |
# Lancer l'app
|
| 83 |
if __name__ == "__main__":
|
|
|
|
| 6 |
base_model_inference,
|
| 7 |
fine_tuned_inference
|
| 8 |
)
|
| 9 |
+
|
| 10 |
+
#Lire le README.md
|
| 11 |
+
with open("README.md", "r", encoding="utf-8") as f:
|
| 12 |
+
readme_content = f.read()
|
| 13 |
|
| 14 |
def predict_with_model(text, model_type):
|
| 15 |
"""
|
|
|
|
| 80 |
)
|
| 81 |
|
| 82 |
with gr.Tab("📄 Documentation"):
|
| 83 |
+
gr.Markdown(readme_content)
|
| 84 |
|
| 85 |
# Lancer l'app
|
| 86 |
if __name__ == "__main__":
|
app.yaml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
title: Classification Text
|
| 2 |
+
emoji: 📈
|
| 3 |
+
colorFrom: blue
|
| 4 |
+
colorTo: red
|
| 5 |
+
sdk: gradio
|
| 6 |
+
sdk_version: 5.34.0
|
| 7 |
+
app_file: app.py
|
| 8 |
+
pinned: false
|