FabsAgo commited on
Commit
2a94ec0
Β·
verified Β·
1 Parent(s): e401089

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -11
app.py CHANGED
@@ -32,7 +32,7 @@ if not HUGGINGFACE_API_TOKEN:
32
  print("Go to your Space's Settings > Repository secrets to add it.")
33
 
34
  # The default AI model
35
- DEFAULT_MODEL = "mistralai/Mistral-7B-Instruct-v0.3"
36
 
37
 
38
  # ══════════════════════════════════════════════════════════════════
@@ -184,13 +184,8 @@ FEW_SHOT_OUTPUT = json.dumps({
184
  from huggingface_hub import InferenceClient
185
 
186
  def call_huggingface_model(referral_text: str, model_id: str = DEFAULT_MODEL) -> str:
187
- """
188
- Send the referral text to a Hugging Face model and get the response.
189
- Uses InferenceClient which handles routing internally.
190
- """
191
  client = InferenceClient(token=HUGGINGFACE_API_TOKEN)
192
 
193
- # Build the conversation messages
194
  messages = [
195
  {"role": "system", "content": SYSTEM_PROMPT},
196
  {"role": "user", "content": f"Example referral:\n{FEW_SHOT_INPUT}"},
@@ -405,12 +400,12 @@ with gr.Blocks(
405
  gr.Markdown("### Input")
406
  model_dropdown = gr.Dropdown(
407
  choices=[
408
- "mistralai/Mistral-7B-Instruct-v0.3",
409
- "HuggingFaceH4/zephyr-7b-beta",
410
- "meta-llama/Llama-2-13b-chat-hf",
411
- "tiiuae/falcon-7b-instruct",
412
  ],
413
- value="mistralai/Mistral-7B-Instruct-v0.3",
414
  label="AI Model",
415
  info="Try different models to compare results"
416
  )
 
32
  print("Go to your Space's Settings > Repository secrets to add it.")
33
 
34
  # The default AI model
35
+ DEFAULT_MODEL = "Qwen/Qwen2.5-72B-Instruct"
36
 
37
 
38
  # ══════════════════════════════════════════════════════════════════
 
184
  from huggingface_hub import InferenceClient
185
 
186
  def call_huggingface_model(referral_text: str, model_id: str = DEFAULT_MODEL) -> str:
 
 
 
 
187
  client = InferenceClient(token=HUGGINGFACE_API_TOKEN)
188
 
 
189
  messages = [
190
  {"role": "system", "content": SYSTEM_PROMPT},
191
  {"role": "user", "content": f"Example referral:\n{FEW_SHOT_INPUT}"},
 
400
  gr.Markdown("### Input")
401
  model_dropdown = gr.Dropdown(
402
  choices=[
403
+ "Qwen/Qwen2.5-72B-Instruct",
404
+ "meta-llama/Meta-Llama-3.1-8B-Instruct",
405
+ "mistralai/Mistral-Nemo-Instruct-2407",
406
+ "microsoft/Phi-3.5-mini-instruct",
407
  ],
408
+ value="Qwen/Qwen2.5-72B-Instruct",
409
  label="AI Model",
410
  info="Try different models to compare results"
411
  )