Beltran Fiz commited on
Commit ·
e6e781d
1
Parent(s): f7683a6
safe check
Browse files
app.py
CHANGED
|
@@ -2,6 +2,8 @@ import os
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
read_key = os.environ.get('HF_TOKEN', None)
|
|
|
|
|
|
|
| 5 |
with gr.Blocks() as demo:
|
| 6 |
gr.load("bbfizp/LBRCS", hf_token=read_key, src="spaces")
|
| 7 |
demo.launch(share=True)
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
read_key = os.environ.get('HF_TOKEN', None)
|
| 5 |
+
if read_key is None:
|
| 6 |
+
raise ValueError("HF_TOKEN environment variable not set. Please set it to your Hugging Face API token.")
|
| 7 |
with gr.Blocks() as demo:
|
| 8 |
gr.load("bbfizp/LBRCS", hf_token=read_key, src="spaces")
|
| 9 |
demo.launch(share=True)
|