Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
import requests
|
|
|
3 |
|
4 |
-
# Define the Hugging Face API endpoint
|
5 |
-
api_url = "https://api-inference.huggingface.co/models/Qwen/
|
6 |
-
|
|
|
|
|
7 |
|
8 |
# Define a function to send prompts to the model and get responses
|
9 |
def query(prompt):
|
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
+
import os
|
4 |
|
5 |
+
# Define the Hugging Face API endpoint
|
6 |
+
api_url = "https://api-inference.huggingface.co/models/Qwen/Qwen-2.5-72B"
|
7 |
+
|
8 |
+
# Retrieve the token from the environment
|
9 |
+
headers = {"Authorization": f"Bearer {os.getenv('HF_TOKEN')}"}
|
10 |
|
11 |
# Define a function to send prompts to the model and get responses
|
12 |
def query(prompt):
|