ShashwatStable commited on
Commit
3736885
·
verified ·
1 Parent(s): 396ee76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidXNlcl8yYkpvRzhxd1BYV3lreXpVNmhCQWNZZVlNRk4iLCJpYXQiOjE3MDYyMDM2NjV9.ujXZh1la_WZqwLtPSySw772W1oC34CPab4GKVMipwHA",
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",