Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ BASE_DIR = os.path.dirname(__file__)
|
|
| 8 |
MODEL_DIR = os.path.join(BASE_DIR, "minilm_sbert_encoder")
|
| 9 |
model = SentenceTransformer(MODEL_DIR)
|
| 10 |
|
| 11 |
-
#
|
| 12 |
FOCUS_AREAS = [
|
| 13 |
"High Blood Pressure",
|
| 14 |
"Diabetes",
|
|
@@ -41,9 +41,9 @@ def classify(text):
|
|
| 41 |
return f"{best_label} (confidence: {best_score:.2f})"
|
| 42 |
|
| 43 |
|
| 44 |
-
# ---------- UI Layout
|
| 45 |
with gr.Blocks(title="MiniLM-SBERT Encoder") as demo:
|
| 46 |
-
gr.Markdown("##
|
| 47 |
|
| 48 |
with gr.Row():
|
| 49 |
inp = gr.Textbox(
|
|
|
|
| 8 |
MODEL_DIR = os.path.join(BASE_DIR, "minilm_sbert_encoder")
|
| 9 |
model = SentenceTransformer(MODEL_DIR)
|
| 10 |
|
| 11 |
+
# Focus area labels
|
| 12 |
FOCUS_AREAS = [
|
| 13 |
"High Blood Pressure",
|
| 14 |
"Diabetes",
|
|
|
|
| 41 |
return f"{best_label} (confidence: {best_score:.2f})"
|
| 42 |
|
| 43 |
|
| 44 |
+
# ---------- UI Layout ----------
|
| 45 |
with gr.Blocks(title="MiniLM-SBERT Encoder") as demo:
|
| 46 |
+
gr.Markdown("## MiniLM-SBERT Encoder")
|
| 47 |
|
| 48 |
with gr.Row():
|
| 49 |
inp = gr.Textbox(
|