ihtesham0345 commited on
Commit
ddcd3d9
·
1 Parent(s): 3509502

Switch to Google Gemma-2-9B-IT for dependable serverless support

Browse files
Files changed (2) hide show
  1. PROJECT_DOCS.md +1 -1
  2. services/analyzer.py +2 -2
PROJECT_DOCS.md CHANGED
@@ -20,7 +20,7 @@ We used the following technologies to build this application from scratch:
20
  | Component | Technology | Purpose |
21
  | :--- | :--- | :--- |
22
  | **Framework** | **FastAPI** | High-performance web framework for building the API endpoints. |
23
- | **AI Model** | **Microsoft Phi-3-Mini** | A highly efficiency 3.8B model, perfectly optimized for free-tier usage. |
24
  | **Connection** | **HF Inference Client** | Connects to Hugging Face's serverless GPU cluster. |
25
  | **Container** | **Docker** | Lightweight container (no heavy ML libraries needed anymore). |
26
  | **Deployment** | **Hugging Face Spaces** | The cloud platform hosting the Docker container. |
 
20
  | Component | Technology | Purpose |
21
  | :--- | :--- | :--- |
22
  | **Framework** | **FastAPI** | High-performance web framework for building the API endpoints. |
23
+ | **AI Model** | **Google Gemma-2-9b-it** | Google's advanced open model (9B), offering high performance and reasoning. |
24
  | **Connection** | **HF Inference Client** | Connects to Hugging Face's serverless GPU cluster. |
25
  | **Container** | **Docker** | Lightweight container (no heavy ML libraries needed anymore). |
26
  | **Deployment** | **Hugging Face Spaces** | The cloud platform hosting the Docker container. |
services/analyzer.py CHANGED
@@ -9,8 +9,8 @@ env_path = Path(__file__).resolve().parent.parent.parent / ".env"
9
  load_dotenv(dotenv_path=env_path)
10
 
11
  # Configuration: Use a powerful model available via free Serverless API
12
- # Phi-3-mini is free, fast, and highly capable for JSON tasks.
13
- MODEL_ID = "microsoft/Phi-3-mini-4k-instruct"
14
 
15
  # Initialize Client
16
  # It automatically picks up HF_TOKEN from environment if set, otherwise works anonymously (with lower limits)
 
9
  load_dotenv(dotenv_path=env_path)
10
 
11
  # Configuration: Use a powerful model available via free Serverless API
12
+ # Gemma-2-9b-it is a strong open model from Google, usually supported on HF Inference.
13
+ MODEL_ID = "google/gemma-2-9b-it"
14
 
15
  # Initialize Client
16
  # It automatically picks up HF_TOKEN from environment if set, otherwise works anonymously (with lower limits)