Spaces:
Build error
Build error
asdasd
Browse files
app.py
CHANGED
@@ -8,7 +8,11 @@ if not hf_token:
|
|
8 |
raise ValueError("No hf_token found in environment variables")
|
9 |
|
10 |
# Load the model using the token
|
11 |
-
|
12 |
-
|
13 |
-
# Launch the Gradio interface
|
14 |
-
interface.launch()
|
|
|
|
|
|
|
|
|
|
8 |
raise ValueError("No hf_token found in environment variables")
|
9 |
|
10 |
# Load the model using the token
|
11 |
+
try:
|
12 |
+
interface = gr.load("models/NoaiGPT/777", api_key=hf_token)
|
13 |
+
# Launch the Gradio interface
|
14 |
+
interface.launch()
|
15 |
+
except gradio.exceptions.ModelNotFoundError as e:
|
16 |
+
print(f"Model not found: {e}")
|
17 |
+
except Exception as e:
|
18 |
+
print(f"An error occurred: {e}")
|