Spaces:
Running
Running
Update pages/Entorno de Ejecución.py
Browse files
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(
|
52 |
-
with open(filename, "rb") as f:
|
53 |
-
|
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 |
|