segestic commited on
Commit
cf44614
·
verified ·
1 Parent(s): 026e7d5

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
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")
12
+ print(output)