tejani commited on
Commit
3f6f71d
·
verified ·
1 Parent(s): 1d35e29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,3 +1,8 @@
1
  import gradio as gr
 
2
 
3
- gr.load("models/ZB-Tech/Text-to-Image").launch()
 
 
 
 
 
1
  import gradio as gr
2
+ import os
3
 
4
+ # Load the API token from the environment variable
5
+ api_token = os.getenv("HF_TOKEN")
6
+ interface = gr.load("models/ZB-Tech/Text-to-Image", api_key=api_token)
7
+
8
+ interface.launch()