segestic's picture
Create app.py
cf44614 verified
raw
history blame
317 Bytes
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)