Spaces:
Runtime error
Runtime error
Try fix streaming try#2
Browse files
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,
|