Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
import concurrent.futures
|
|
|
|
|
4 |
def prompt(pos,hei,wid,no):
|
5 |
hed={
|
6 |
"Content-Type": "application/json",
|
7 |
-
"Authorization": "Bearer
|
8 |
}
|
9 |
j={
|
10 |
"deployment_id": "2ce5158e-7fa0-4dd6-b533-550c1e8f8c3b",
|
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
import concurrent.futures
|
4 |
+
import os
|
5 |
+
SECRET_TOKEN = os.getenv("SECRET_TOKEN")
|
6 |
def prompt(pos,hei,wid,no):
|
7 |
hed={
|
8 |
"Content-Type": "application/json",
|
9 |
+
"Authorization": f"Bearer {SECRET_TOKEN} ",
|
10 |
}
|
11 |
j={
|
12 |
"deployment_id": "2ce5158e-7fa0-4dd6-b533-550c1e8f8c3b",
|