Spaces:
Running
on
Zero
Running
on
Zero
xinjie.wang
commited on
Commit
·
43fd7b6
1
Parent(s):
7d26423
update
Browse files- app.py +10 -8
- embodied_gen/utils/tags.py +1 -0
app.py
CHANGED
|
@@ -31,8 +31,8 @@ from pathlib import Path
|
|
| 31 |
import gradio as gr
|
| 32 |
import pandas as pd
|
| 33 |
from app_style import custom_theme, lighting_css
|
| 34 |
-
|
| 35 |
-
|
| 36 |
try:
|
| 37 |
from embodied_gen.utils.gpt_clients import GPT_CLIENT as gpt_client
|
| 38 |
|
|
@@ -50,6 +50,13 @@ except Exception as e:
|
|
| 50 |
RUNNING_MODE = "hf_remote" # local or hf_remote
|
| 51 |
CSV_FILE = "dataset_index.csv"
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
if RUNNING_MODE == "local":
|
| 54 |
DATA_ROOT = "/horizon-bucket/robot_lab/datasets/embodiedgen/assets"
|
| 55 |
elif RUNNING_MODE == "hf_remote":
|
|
@@ -724,9 +731,4 @@ with gr.Blocks(
|
|
| 724 |
|
| 725 |
|
| 726 |
if __name__ == "__main__":
|
| 727 |
-
demo.launch(
|
| 728 |
-
# server_port=8088,
|
| 729 |
-
# allowed_paths=[
|
| 730 |
-
# "/horizon-bucket/robot_lab/datasets/embodiedgen/assets"
|
| 731 |
-
# ],
|
| 732 |
-
)
|
|
|
|
| 31 |
import gradio as gr
|
| 32 |
import pandas as pd
|
| 33 |
from app_style import custom_theme, lighting_css
|
| 34 |
+
from embodied_gen.utils.tags import VERSION
|
| 35 |
+
|
| 36 |
try:
|
| 37 |
from embodied_gen.utils.gpt_clients import GPT_CLIENT as gpt_client
|
| 38 |
|
|
|
|
| 50 |
RUNNING_MODE = "hf_remote" # local or hf_remote
|
| 51 |
CSV_FILE = "dataset_index.csv"
|
| 52 |
|
| 53 |
+
# Compatible with huggingface space zero GPU
|
| 54 |
+
import spaces
|
| 55 |
+
@spaces.GPU
|
| 56 |
+
def fake_gpu_init():
|
| 57 |
+
pass
|
| 58 |
+
fake_gpu_init()
|
| 59 |
+
|
| 60 |
if RUNNING_MODE == "local":
|
| 61 |
DATA_ROOT = "/horizon-bucket/robot_lab/datasets/embodiedgen/assets"
|
| 62 |
elif RUNNING_MODE == "hf_remote":
|
|
|
|
| 731 |
|
| 732 |
|
| 733 |
if __name__ == "__main__":
|
| 734 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
embodied_gen/utils/tags.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
VERSION = "v0.1.8"
|