segestic commited on
Commit
7ebcd2a
·
verified ·
1 Parent(s): cf44614

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,11 +1,11 @@
1
  import os
2
  import gradio as gr
3
 
4
- # Retrieve the Hugging Face token from environment variables
5
  hf_token = os.getenv("HF_TOKEN")
6
 
7
- # Load a private Hugging Face Space with a token
8
- app = gr.load("segestic/Token-and-Cost-Calculator", hf_token="your_huggingface_token")
9
 
10
  # Use the app
11
  output = app("Input text")
 
1
  import os
2
  import gradio as gr
3
 
4
+ # Access the Hugging Face token from environment variables
5
  hf_token = os.getenv("HF_TOKEN")
6
 
7
+ # Load a private Hugging Face Space using the updated `token` parameter and `src='spaces'`
8
+ app = gr.load(name="spaces/segestic/Token-and-Cost-Calculator", src="spaces", token=hf_token)
9
 
10
  # Use the app
11
  output = app("Input text")