nxphi47 commited on
Commit
11dbd3a
1 Parent(s): 2c40153

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -101,18 +101,20 @@ def launch_demo():
101
  f"<br>" +
102
  MODEL_INFO.format(model_path=model_path)
103
  )
104
-
105
- demo = CustomTabbedInterface(
106
- interface_list=list(demos.values()),
107
- tab_names=demos_names,
108
- title=f"{MODEL_TITLE}",
109
- description=descriptions,
110
- )
 
 
111
 
112
  demo.title = MODEL_NAME
113
 
114
- with demo:
115
- gr.Markdown(CITE_MARKDOWN)
116
 
117
  demo.queue(api_open=False)
118
  return demo
 
101
  f"<br>" +
102
  MODEL_INFO.format(model_path=model_path)
103
  )
104
+ if len(demos) == 1:
105
+ demo = demos[DEMOS[k]]
106
+ else:
107
+ demo = CustomTabbedInterface(
108
+ interface_list=list(demos.values()),
109
+ tab_names=demos_names,
110
+ title=f"{MODEL_TITLE}",
111
+ description=descriptions,
112
+ )
113
 
114
  demo.title = MODEL_NAME
115
 
116
+ # with demo:
117
+ # gr.Markdown(CITE_MARKDOWN)
118
 
119
  demo.queue(api_open=False)
120
  return demo