not-lain commited on
Commit
cc8d662
·
1 Parent(s): e16bfc3

add info for why the interface could not be rendered

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -24,11 +24,12 @@ with gr.Blocks() as demo :
24
  filepath = f"registries/{registry}.md"
25
  md = get_markdown(filepath)
26
  gr.Markdown(md)
27
- # try :
28
- # code = get_interface(md)
29
- # exec(code)
30
- # except Exception as e :
31
- # raise gr.Error(e)
 
32
 
33
 
34
  demo.launch()
 
24
  filepath = f"registries/{registry}.md"
25
  md = get_markdown(filepath)
26
  gr.Markdown(md)
27
+ try :
28
+ code = get_interface(md)
29
+ exec(code)
30
+ except Exception as e :
31
+ message = f"could not render the interface because of the following error : {e} "
32
+ gr.Info(message)
33
 
34
 
35
  demo.launch()