merve HF staff commited on
Commit
acf785d
·
1 Parent(s): e792d8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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}"