Spaces:
Sleeping
Sleeping
Another try
Browse files
app.py
CHANGED
|
@@ -4,17 +4,17 @@ from huggingface_hub import InferenceClient
|
|
| 4 |
|
| 5 |
api_key = os.getenv("HF_API_KEY")
|
| 6 |
client = InferenceClient(api_key=api_key)
|
| 7 |
-
completion = client.chat.completions.create(
|
| 8 |
-
model="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 9 |
-
messages=messages,
|
| 10 |
-
max_tokens=500
|
| 11 |
-
)
|
| 12 |
messages = [
|
| 13 |
{
|
| 14 |
"role": "user",
|
| 15 |
"content": user_input
|
| 16 |
}
|
| 17 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
user_input = st.text_input('Ask me a question')
|
| 20 |
if st.button("Submit"):
|
|
|
|
| 4 |
|
| 5 |
api_key = os.getenv("HF_API_KEY")
|
| 6 |
client = InferenceClient(api_key=api_key)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
messages = [
|
| 8 |
{
|
| 9 |
"role": "user",
|
| 10 |
"content": user_input
|
| 11 |
}
|
| 12 |
]
|
| 13 |
+
completion = client.chat.completions.create(
|
| 14 |
+
model="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 15 |
+
messages=messages,
|
| 16 |
+
max_tokens=500
|
| 17 |
+
)
|
| 18 |
|
| 19 |
user_input = st.text_input('Ask me a question')
|
| 20 |
if st.button("Submit"):
|