zhangbofei commited on
Commit
73237fe
1 Parent(s): 1342453

fix: add zero-gpu

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -6,13 +6,14 @@ import gradio as gr
6
  from src.model.model_llava import inference
7
  from src.serve.gradio_block_arena_vision_named import build_side_by_side_vision_ui_named
8
 
9
-
10
- if __name__ == "__main__":
11
- logger.info("inference called!", inference())
12
  with gr.Blocks() as demo:
13
-
14
  states = build_side_by_side_vision_ui_named(
15
  models=["llava-fire", "llava-original"]
16
  )
17
 
18
- demo.launch()
 
 
 
 
6
  from src.model.model_llava import inference
7
  from src.serve.gradio_block_arena_vision_named import build_side_by_side_vision_ui_named
8
 
9
+ @spaces.GPU(duration=120)
10
+ def main():
 
11
  with gr.Blocks() as demo:
 
12
  states = build_side_by_side_vision_ui_named(
13
  models=["llava-fire", "llava-original"]
14
  )
15
 
16
+ demo.launch()
17
+
18
+ if __name__ == "__main__":
19
+ main()