Spaces:
Runtime error
Runtime error
Create app.py
Browse files
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)
|