Spaces:
Build error
Build error
asd
Browse files
app.py
CHANGED
@@ -1,3 +1,14 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
import os
|
3 |
|
4 |
+
# Get the Hugging Face token from the environment variable
|
5 |
+
hf_token = os.getenv("hf_token")
|
6 |
+
|
7 |
+
if not hf_token:
|
8 |
+
raise ValueError("No hf_token found in environment variables")
|
9 |
+
|
10 |
+
# Load the model using the token
|
11 |
+
interface = gr.load("models/NoaiGPT/777", api_key=hf_token)
|
12 |
+
|
13 |
+
# Launch the Gradio interface
|
14 |
+
interface.launch()
|