frncscp commited on
Commit
a4c199e
1 Parent(s): 696d9c3

Update pages/Entorno de Ejecución.py

Browse files
Files changed (1) hide show
  1. pages/Entorno de Ejecución.py +3 -3
pages/Entorno de Ejecución.py CHANGED
@@ -48,9 +48,9 @@ def multiclass_prediction(classifier, important_class): #made for hf zero-shot p
48
  API_URL = "https://api-inference.huggingface.co/models"
49
  headers = {"Authorization": f"Bearer {st.secrets['token']}"}
50
 
51
- def query(filename, model_name): #HF API
52
- with open(filename, "rb") as f:
53
- data = f.read()
54
  response = requests.post(API_URL + "/" + model_name, headers=headers, data=data)
55
  return response.json #.json
56
 
 
48
  API_URL = "https://api-inference.huggingface.co/models"
49
  headers = {"Authorization": f"Bearer {st.secrets['token']}"}
50
 
51
+ def query(data, model_name): #HF API
52
+ #with open(filename, "rb") as f:
53
+ # data = f.read()
54
  response = requests.post(API_URL + "/" + model_name, headers=headers, data=data)
55
  return response.json #.json
56