Spaces:
Running
on
Zero
Running
on
Zero
derektan
commited on
Commit
·
eaff0d6
1
Parent(s):
0551b8f
Combined both apps into the same gradio UI
Browse files- app.py +9 -3
- app_BACKUP.py → app_multimodal_inference.py +0 -0
- test_parameter.py +1 -1
app.py
CHANGED
@@ -357,6 +357,12 @@ with gr.Blocks(title="Search-TTA (Simplified)", theme=gr.themes.Base()) as demo:
|
|
357 |
# if def main
|
358 |
if __name__ == "__main__":
|
359 |
|
360 |
-
#
|
361 |
-
demo
|
362 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
# if def main
|
358 |
if __name__ == "__main__":
|
359 |
|
360 |
+
# Combine backup and current demos into a single tabbed interface (Backup first).
|
361 |
+
from app_multimodal_inference import demo as multimodal_demo
|
362 |
+
|
363 |
+
combined_demo = gr.TabbedInterface(
|
364 |
+
[multimodal_demo, demo],
|
365 |
+
["Multimodal Inference", "Search-TTA"]
|
366 |
+
)
|
367 |
+
combined_demo.queue(max_size=15)
|
368 |
+
combined_demo.launch(share=True)
|
app_BACKUP.py → app_multimodal_inference.py
RENAMED
File without changes
|
test_parameter.py
CHANGED
@@ -162,7 +162,7 @@ INPUT_DIM = 4
|
|
162 |
EMBEDDING_DIM = 128
|
163 |
K_SIZE = 8 # 8
|
164 |
|
165 |
-
USE_GPU =
|
166 |
NUM_GPU = getenv("NUM_GPU", default=2, cast_type=int) # the number of GPUs
|
167 |
NUM_META_AGENT = getenv("NUM_META_AGENT", default=4, cast_type=int) # the number of processes
|
168 |
FOLDER_NAME = 'inference'
|
|
|
162 |
EMBEDDING_DIM = 128
|
163 |
K_SIZE = 8 # 8
|
164 |
|
165 |
+
USE_GPU = True # do you want to use GPUS?
|
166 |
NUM_GPU = getenv("NUM_GPU", default=2, cast_type=int) # the number of GPUs
|
167 |
NUM_META_AGENT = getenv("NUM_META_AGENT", default=4, cast_type=int) # the number of processes
|
168 |
FOLDER_NAME = 'inference'
|