ndc8 commited on
Commit
88c3c6c
·
1 Parent(s): 04d695c

Revert model back to gemma-3n-E4B-it-GGUF

Browse files

- Keep the original model as requested
- Maintain the fix for deprecated use_auth_token parameter

Files changed (2) hide show
  1. backend_service.py +2 -2
  2. test_hf_api.py +1 -1
backend_service.py CHANGED
@@ -75,7 +75,7 @@ class ChatMessage(BaseModel):
75
  return v
76
 
77
  class ChatCompletionRequest(BaseModel):
78
- model: str = Field(default="microsoft/DialoGPT-medium", description="The model to use for completion")
79
  messages: List[ChatMessage] = Field(..., description="List of messages in the conversation")
80
  max_tokens: Optional[int] = Field(default=512, ge=1, le=2048, description="Maximum tokens to generate")
81
  temperature: Optional[float] = Field(default=0.7, ge=0.0, le=2.0, description="Sampling temperature")
@@ -124,7 +124,7 @@ class CompletionRequest(BaseModel):
124
  # Global variables for model management
125
  inference_client: Optional[InferenceClient] = None
126
  image_text_pipeline = None # type: ignore
127
- current_model = "microsoft/DialoGPT-medium" # Valid HuggingFace model for chat
128
  vision_model = "Salesforce/blip-image-captioning-base" # Working model for image captioning
129
  tokenizer = None
130
 
 
75
  return v
76
 
77
  class ChatCompletionRequest(BaseModel):
78
+ model: str = Field(default="gemma-3n-E4B-it-GGUF", description="The model to use for completion")
79
  messages: List[ChatMessage] = Field(..., description="List of messages in the conversation")
80
  max_tokens: Optional[int] = Field(default=512, ge=1, le=2048, description="Maximum tokens to generate")
81
  temperature: Optional[float] = Field(default=0.7, ge=0.0, le=2.0, description="Sampling temperature")
 
124
  # Global variables for model management
125
  inference_client: Optional[InferenceClient] = None
126
  image_text_pipeline = None # type: ignore
127
+ current_model = "gemma-3n-E4B-it-GGUF"
128
  vision_model = "Salesforce/blip-image-captioning-base" # Working model for image captioning
129
  tokenizer = None
130
 
test_hf_api.py CHANGED
@@ -5,7 +5,7 @@ API_URL = "https://cong182-firstai.hf.space/v1/chat/completions"
5
 
6
  # Example payload for OpenAI-compatible chat completion
7
  payload = {
8
- "model": "microsoft/DialoGPT-medium",
9
  "messages": [
10
  {"role": "system", "content": "You are a helpful assistant."},
11
  {"role": "user", "content": "Hello, who won the world cup in 2018?"}
 
5
 
6
  # Example payload for OpenAI-compatible chat completion
7
  payload = {
8
+ "model": "gemma-3n-E4B-it-GGUF",
9
  "messages": [
10
  {"role": "system", "content": "You are a helpful assistant."},
11
  {"role": "user", "content": "Hello, who won the world cup in 2018?"}