Spaces:
Sleeping
Sleeping
ayushmodi001 commited on
Commit ·
7ca7e37
1
Parent(s): 51b17ab
changed model
Browse files- app/config.py +1 -1
- app/distractor_generator.py +1 -2
- requirements.txt +1 -1
- scripts/prepare_models.py +1 -1
app/config.py
CHANGED
|
@@ -11,7 +11,7 @@ class Settings(BaseSettings):
|
|
| 11 |
settings = Settings()
|
| 12 |
|
| 13 |
# --- T5 Model Configuration ---
|
| 14 |
-
T5_MODEL_NAME = "Ayush472/
|
| 15 |
|
| 16 |
# --- Google Gemini API Configuration ---
|
| 17 |
GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
|
|
|
|
| 11 |
settings = Settings()
|
| 12 |
|
| 13 |
# --- T5 Model Configuration ---
|
| 14 |
+
T5_MODEL_NAME = "Ayush472/T5QuestionGenerator"
|
| 15 |
|
| 16 |
# --- Google Gemini API Configuration ---
|
| 17 |
GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
|
app/distractor_generator.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
'''
|
| 2 |
import google.generativeai as genai
|
| 3 |
from .config import GOOGLE_API_KEY, GEMINI_MODEL_NAME, DISTRACTOR_BATCH_SIZE, MAX_PARALLEL_DISTRACTOR_BATCHES
|
| 4 |
from .utils import get_logger, parse_json_from_response
|
|
@@ -237,4 +236,4 @@ async def generate_distractors(qa_pairs):
|
|
| 237 |
return final_qa_with_distractors
|
| 238 |
except Exception as e:
|
| 239 |
logger.error(f"Error generating distractors: {e}", exc_info=True)
|
| 240 |
-
return [dict(qa, distractors=[]) for qa in qa_pairs]
|
|
|
|
|
|
|
| 1 |
import google.generativeai as genai
|
| 2 |
from .config import GOOGLE_API_KEY, GEMINI_MODEL_NAME, DISTRACTOR_BATCH_SIZE, MAX_PARALLEL_DISTRACTOR_BATCHES
|
| 3 |
from .utils import get_logger, parse_json_from_response
|
|
|
|
| 236 |
return final_qa_with_distractors
|
| 237 |
except Exception as e:
|
| 238 |
logger.error(f"Error generating distractors: {e}", exc_info=True)
|
| 239 |
+
return [dict(qa, distractors=[]) for qa in qa_pairs]'''
|
requirements.txt
CHANGED
|
@@ -13,4 +13,4 @@ tqdm==4.67.1
|
|
| 13 |
gunicorn==23.0.0
|
| 14 |
pydantic-settings==2.3.4
|
| 15 |
gensim
|
| 16 |
-
huggingface_hub==0.
|
|
|
|
| 13 |
gunicorn==23.0.0
|
| 14 |
pydantic-settings==2.3.4
|
| 15 |
gensim
|
| 16 |
+
huggingface_hub==0.34.0
|
scripts/prepare_models.py
CHANGED
|
@@ -20,7 +20,7 @@ try:
|
|
| 20 |
except ImportError:
|
| 21 |
# Fallback to a safe location if config can't be imported
|
| 22 |
CACHE_BASE_DIR = os.getenv("CACHE_BASE_DIR", "/tmp/opportunity_t5_model_cache")
|
| 23 |
-
T5_MODEL_NAME = "Ayush472/
|
| 24 |
logger.info(f"Could not import from config, using fallback cache directory: {CACHE_BASE_DIR}")
|
| 25 |
|
| 26 |
# Paths for optimized models
|
|
|
|
| 20 |
except ImportError:
|
| 21 |
# Fallback to a safe location if config can't be imported
|
| 22 |
CACHE_BASE_DIR = os.getenv("CACHE_BASE_DIR", "/tmp/opportunity_t5_model_cache")
|
| 23 |
+
T5_MODEL_NAME = "Ayush472/T5QuestionGenerator"
|
| 24 |
logger.info(f"Could not import from config, using fallback cache directory: {CACHE_BASE_DIR}")
|
| 25 |
|
| 26 |
# Paths for optimized models
|