Update app.py
Browse files
app.py
CHANGED
|
@@ -6,12 +6,13 @@ client = InferenceClient(
|
|
| 6 |
)
|
| 7 |
def answer(question):
|
| 8 |
|
| 9 |
-
response = client.chat.
|
| 10 |
model="Qwen/Qwen3-4B-Instruct-2507",
|
| 11 |
-
messages = [
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
| 15 |
)
|
| 16 |
return response.choices[0].message.content
|
| 17 |
demo = gr.interface(
|
|
@@ -21,3 +22,4 @@ demo = gr.interface(
|
|
| 21 |
title="VR-LAB"
|
| 22 |
)
|
| 23 |
demo.launch()
|
|
|
|
|
|
| 6 |
)
|
| 7 |
def answer(question):
|
| 8 |
|
| 9 |
+
response = client.chat.completions.create(
|
| 10 |
model="Qwen/Qwen3-4B-Instruct-2507",
|
| 11 |
+
messages = [
|
| 12 |
+
{"role": "user",
|
| 13 |
+
"content":"question"
|
| 14 |
+
}
|
| 15 |
+
]
|
| 16 |
)
|
| 17 |
return response.choices[0].message.content
|
| 18 |
demo = gr.interface(
|
|
|
|
| 22 |
title="VR-LAB"
|
| 23 |
)
|
| 24 |
demo.launch()
|
| 25 |
+
|