Serializable commited on
Commit
04d5e4f
1 Parent(s): 838d7b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1,7 +1,12 @@
1
  #try to rebuilt
2
  import os
3
  import gradio as gr
4
- demo = gr.load("giurimatrix/chatbot", src="spaces",api_key=os.environ.get("hf_token_giurimatrix"))
5
- demo.launch()
 
 
 
 
 
6
 
7
 
 
1
  #try to rebuilt
2
  import os
3
  import gradio as gr
4
+
5
+ api_key = os.environ.get("hf_token_giurimatrix")
6
+ if api_key is None:
7
+ raise ValueError("API key non trovata. Configura la variabile d'ambiente hf_token_giurimatrix.")
8
+
9
+ demo = gr.load("giurimatrix/chatbot", src="spaces", api_key=api_key)
10
+ demo.launch()
11
 
12