Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
# Create a self-contained Gradio app that uses the agent-driven loop (Option A)
|
| 2 |
# It expects `level_classifier_tool.py` to be colocated (or installed on PYTHONPATH).
|
|
|
|
| 3 |
import sys
|
| 4 |
import os
|
| 5 |
from huggingface_hub import hf_hub_download
|
|
@@ -24,7 +25,6 @@ from level_classifier_tool_2 import (
|
|
| 24 |
from task_temp import rag_temp, rag_cls_temp, cls_temp, gen_temp
|
| 25 |
from all_tools import classify_and_score, QuestionRetrieverTool
|
| 26 |
from phrases import BLOOMS_PHRASES, DOK_PHRASES
|
| 27 |
-
import spaces
|
| 28 |
# Prebuild embeddings once
|
| 29 |
_backend = HFEmbeddingBackend(model_name="google/embeddinggemma-300m")
|
| 30 |
_BLOOM_INDEX = build_phrase_index(_backend, BLOOMS_PHRASES)
|
|
|
|
| 1 |
# Create a self-contained Gradio app that uses the agent-driven loop (Option A)
|
| 2 |
# It expects `level_classifier_tool.py` to be colocated (or installed on PYTHONPATH).
|
| 3 |
+
import spaces
|
| 4 |
import sys
|
| 5 |
import os
|
| 6 |
from huggingface_hub import hf_hub_download
|
|
|
|
| 25 |
from task_temp import rag_temp, rag_cls_temp, cls_temp, gen_temp
|
| 26 |
from all_tools import classify_and_score, QuestionRetrieverTool
|
| 27 |
from phrases import BLOOMS_PHRASES, DOK_PHRASES
|
|
|
|
| 28 |
# Prebuild embeddings once
|
| 29 |
_backend = HFEmbeddingBackend(model_name="google/embeddinggemma-300m")
|
| 30 |
_BLOOM_INDEX = build_phrase_index(_backend, BLOOMS_PHRASES)
|