File size: 317 Bytes
cf44614
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import os
import gradio as gr

# Retrieve the Hugging Face token from environment variables
hf_token = os.getenv("HF_TOKEN")

# Load a private Hugging Face Space with a token
app = gr.load("segestic/Token-and-Cost-Calculator", hf_token="your_huggingface_token")

# Use the app
output = app("Input text")
print(output)