Spaces:
Runtime error
Runtime error
Commit
·
dc2f37a
1
Parent(s):
1d5bd93
Update app.py
Browse files
app.py
CHANGED
@@ -116,17 +116,16 @@ def submit(
|
|
116 |
"type": security_selector.lower()
|
117 |
}
|
118 |
|
119 |
-
print(payload)
|
120 |
|
121 |
payload = json.dumps(payload)
|
122 |
-
print(payload)
|
123 |
|
124 |
headers = {
|
125 |
"Authorization": f"Bearer {hf_token_input.strip()}",
|
126 |
"Content-Type": "application/json",
|
127 |
}
|
128 |
endpoint_url = f"https://api.endpoints.huggingface.cloud/endpoint"
|
129 |
-
print(endpoint_url)
|
130 |
|
131 |
response = requests.post(endpoint_url, headers=headers, data=payload)
|
132 |
if response.status_code == 400:
|
@@ -155,7 +154,7 @@ with gr.Blocks() as demo2:
|
|
155 |
)
|
156 |
|
157 |
gr.Markdown("""
|
158 |
-
####
|
159 |
""")
|
160 |
endpoint_name_input = gr.Textbox(
|
161 |
show_label=False
|
|
|
116 |
"type": security_selector.lower()
|
117 |
}
|
118 |
|
|
|
119 |
|
120 |
payload = json.dumps(payload)
|
121 |
+
print(f"Payload: {payload}")
|
122 |
|
123 |
headers = {
|
124 |
"Authorization": f"Bearer {hf_token_input.strip()}",
|
125 |
"Content-Type": "application/json",
|
126 |
}
|
127 |
endpoint_url = f"https://api.endpoints.huggingface.cloud/endpoint"
|
128 |
+
print(f"Endpoint: {endpoint_url}")
|
129 |
|
130 |
response = requests.post(endpoint_url, headers=headers, data=payload)
|
131 |
if response.status_code == 400:
|
|
|
154 |
)
|
155 |
|
156 |
gr.Markdown("""
|
157 |
+
#### Endpoint Name
|
158 |
""")
|
159 |
endpoint_name_input = gr.Textbox(
|
160 |
show_label=False
|