LTEnjoy commited on
Commit
dc6aff9
1 Parent(s): d753e30

Add application file

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. run.py +34 -11
Dockerfile CHANGED
@@ -18,7 +18,7 @@ RUN pip install --no-cache-dir -r /code/requirements.txt
18
  RUN conda install pytorch::faiss-gpu --yes
19
 
20
  # Download foldseek
21
- RUN wget wget 'https://drive.usercontent.google.com/download?id=1B_9t3n_nlj8Y3Kpc_mMjtMdY0OPYa7Re&export=download&authuser=0' -O /tmp/foldseek
22
  RUN chmod +x /tmp/foldseek
23
 
24
  # Download ProTrek model
 
18
  RUN conda install pytorch::faiss-gpu --yes
19
 
20
  # Download foldseek
21
+ RUN wget 'https://drive.usercontent.google.com/download?id=1B_9t3n_nlj8Y3Kpc_mMjtMdY0OPYa7Re&export=download&authuser=0' -O /tmp/foldseek
22
  RUN chmod +x /tmp/foldseek
23
 
24
  # Download ProTrek model
run.py CHANGED
@@ -1,16 +1,39 @@
1
- import gradio as gr
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
 
3
 
4
- def update(name):
5
- return f"Welcome to Gradio, {name}!"
6
 
7
 
 
8
  with gr.Blocks() as demo:
9
- gr.Markdown("Start typing below and then click **Run** to see the output.")
10
- with gr.Row():
11
- inp = gr.Textbox(placeholder="What is your name?")
12
- out = gr.Textbox()
13
- btn = gr.Button("Run")
14
- btn.click(fn=update, inputs=inp, outputs=out)
15
-
16
- demo.launch()
 
 
1
+ # import gradio as gr
2
+ #
3
+ #
4
+ # def update(name):
5
+ # return f"Welcome to Gradio, {name}!"
6
+ #
7
+ #
8
+ # with gr.Blocks() as demo:
9
+ # gr.Markdown("Start typing below and then click **Run** to see the output.")
10
+ # with gr.Row():
11
+ # inp = gr.Textbox(placeholder="What is your name?")
12
+ # out = gr.Textbox()
13
+ # btn = gr.Button("Run")
14
+ # btn.click(fn=update, inputs=inp, outputs=out)
15
+ #
16
+ # demo.launch()
17
+
18
+ import sys
19
+ root_dir = __file__.rsplit("/", 3)[0]
20
+ if root_dir not in sys.path:
21
+ sys.path.append(root_dir)
22
 
23
+ import gradio as gr
24
 
25
+ from demo.modules.search import build_search_module
26
+ from demo.modules.compute_score import build_score_computation
27
 
28
 
29
+ # Build demo
30
  with gr.Blocks() as demo:
31
+ build_search_module()
32
+ build_score_computation()
33
+
34
+
35
+ if __name__ == '__main__':
36
+ # args = get_args()
37
+
38
+ # Run demo
39
+ demo.launch()