zerovic commited on
Commit
7e49c0b
·
verified ·
1 Parent(s): 6d9d807

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -5,8 +5,8 @@ import os
5
  from groq import Groq
6
  import gradio as gr
7
 
8
- # FIX: Read the key name from your Hugging Face Environment Variables secrets configuration
9
- # Make sure you set a secret named "GROQ_API_KEY" in your Hugging Face Space settings interface.
10
  api_key = os.getenv("GROQ_API_KEY", "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")
11
  client = Groq(api_key=api_key)
12
 
@@ -65,11 +65,13 @@ def feifeichat(image):
65
  }
66
  ]
67
 
68
- # FIX: Changed model to Groq's official high-speed multimodal vision model identifier
69
  response = client.chat.completions.create(
70
- model="llama-3.2-11b-vision-preview",
71
  messages=messages,
72
  response_format={"type": "json_object"},
 
 
73
  stream=True
74
  )
75
 
 
5
  from groq import Groq
6
  import gradio as gr
7
 
8
+ # Read the key name from Hugging Face Environment Variables secrets configuration
9
+ # Ensure "GROQ_API_KEY" is set in your Hugging Face Space settings.
10
  api_key = os.getenv("GROQ_API_KEY", "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")
11
  client = Groq(api_key=api_key)
12
 
 
65
  }
66
  ]
67
 
68
+ # Updated model to Qwen 3.6 27B and added reasoning_effort="none" for fast, non-thinking JSON output
69
  response = client.chat.completions.create(
70
+ model="qwen/qwen3.6-27b",
71
  messages=messages,
72
  response_format={"type": "json_object"},
73
+ reasoning_effort="none",
74
+ temperature=0.7,
75
  stream=True
76
  )
77