quan1998 commited on
Commit
ca3abd0
·
verified ·
1 Parent(s): c751402

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,8 +7,8 @@ app = FastAPI()
7
  HF_TOKEN = os.getenv("HF_TOKEN") # đọc token từ Secrets
8
 
9
  # client = InferenceClient(token=HF_TOKEN, model="google/gemma-3-12b-it", provider="featherless-ai")
10
- # client = InferenceClient(token=HF_TOKEN, model="meta-llama/Llama-3.2-3B-Instruct")
11
- client = InferenceClient(token=HF_TOKEN, model="Qwen/Qwen3-4B-Instruct-2507")
12
  # client = InferenceClient(token=HF_TOKEN, model="swiss-ai/Apertus-70B-Instruct-2509")
13
 
14
 
@@ -26,5 +26,5 @@ async def generate(request: Request):
26
  ]
27
  out = client.chat_completion(messages)
28
  print(out)
29
- response = out.choices[0]["message"]["content"]
30
  return {"response": response}
 
7
  HF_TOKEN = os.getenv("HF_TOKEN") # đọc token từ Secrets
8
 
9
  # client = InferenceClient(token=HF_TOKEN, model="google/gemma-3-12b-it", provider="featherless-ai")
10
+ client = InferenceClient(token=HF_TOKEN, model="meta-llama/Llama-3.2-3B-Instruct")
11
+ # client = InferenceClient(token=HF_TOKEN, model="Qwen/Qwen3-4B-Instruct-2507")
12
  # client = InferenceClient(token=HF_TOKEN, model="swiss-ai/Apertus-70B-Instruct-2509")
13
 
14
 
 
26
  ]
27
  out = client.chat_completion(messages)
28
  print(out)
29
+ response = out.choices[0].message.content
30
  return {"response": response}