redfernstech commited on
Commit
943d5eb
·
verified ·
1 Parent(s): 46e1a9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -25,7 +25,7 @@ class MessageRequest(BaseModel):
25
  message: str
26
  language: str
27
 
28
- repo_id = "microsoft/phi-4"
29
  llm_client = InferenceClient(
30
  model=repo_id,
31
  token=os.getenv("HF_TOKEN"),
@@ -61,8 +61,8 @@ templates = Jinja2Templates(directory="static")
61
 
62
  # Configure Llama index settings
63
  Settings.llm = HuggingFaceInferenceAPI(
64
- model_name="microsoft/phi-4",
65
- tokenizer_name="microsoft/phi-4",
66
  context_window=3000,
67
  token=os.getenv("HF_TOKEN"),
68
  max_new_tokens=512,
@@ -185,7 +185,7 @@ async def chat(request: MessageRequest):
185
  audio_path = "response.mp3"
186
  tts.save(audio_path)
187
  return {"response": response1,
188
- "audioUrl": f"http://localhost:5000/audio/{audio_path}"}
189
 
190
  @app.get("/")
191
  def read_root(request: Request):
 
25
  message: str
26
  language: str
27
 
28
+ repo_id = "HuggingFaceH4/zephyr-7b-alpha"
29
  llm_client = InferenceClient(
30
  model=repo_id,
31
  token=os.getenv("HF_TOKEN"),
 
61
 
62
  # Configure Llama index settings
63
  Settings.llm = HuggingFaceInferenceAPI(
64
+ model_name="HuggingFaceH4/zephyr-7b-alpha",
65
+ tokenizer_name="HuggingFaceH4/zephyr-7b-alpha",
66
  context_window=3000,
67
  token=os.getenv("HF_TOKEN"),
68
  max_new_tokens=512,
 
185
  audio_path = "response.mp3"
186
  tts.save(audio_path)
187
  return {"response": response1,
188
+ "audioUrl": f"https://redfernstech-hotel-gtts.hf.space/audio/{audio_path}"}
189
 
190
  @app.get("/")
191
  def read_root(request: Request):