andreska commited on
Commit
f6e0289
·
verified ·
1 Parent(s): 348670d

Try fix streaming try#2

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -8,7 +8,12 @@ client = InferenceClient(api_key=api_key)
8
  def analyze(project_data, question):
9
  try:
10
  prompt = f"Analyze this project: {project_data}\n\nQuestion: {question}"
11
-
 
 
 
 
 
12
  response = client.chat.completions.create(
13
  model="Qwen/Qwen2.5-72B-Instruct",
14
  messages=messages,
 
8
  def analyze(project_data, question):
9
  try:
10
  prompt = f"Analyze this project: {project_data}\n\nQuestion: {question}"
11
+
12
+ messages = [
13
+ {"role": "system", "content": f"Context: {project_data}"},
14
+ {"role": "user", "content": question}
15
+ ]
16
+
17
  response = client.chat.completions.create(
18
  model="Qwen/Qwen2.5-72B-Instruct",
19
  messages=messages,