Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ from transformers import pipeline
|
|
4 |
|
5 |
import requests
|
6 |
|
|
|
7 |
def query(payload, model_id, api_token):
|
8 |
headers = {"Authorization": f"Bearer {api_token}"}
|
9 |
API_URL = f"https://api-inference.huggingface.co/models/{model_id}"
|
|
|
4 |
|
5 |
import requests
|
6 |
|
7 |
+
@st.cache
|
8 |
def query(payload, model_id, api_token):
|
9 |
headers = {"Authorization": f"Bearer {api_token}"}
|
10 |
API_URL = f"https://api-inference.huggingface.co/models/{model_id}"
|