Spaces:
Running
on
T4
Running
on
T4
Upload gradio_app.py
Browse files- gradio_app.py +4 -5
gradio_app.py
CHANGED
@@ -41,9 +41,8 @@ print('install custom')
|
|
41 |
subprocess.run(shlex.split("pip install custom_rasterizer-0.1-cp310-cp310-linux_x86_64.whl"), check=True)
|
42 |
|
43 |
@spaces.GPU
|
44 |
-
def my_gpu_function(
|
45 |
-
|
46 |
-
return text + " processed on GPU"
|
47 |
|
48 |
def get_example_img_list():
|
49 |
print('Loading example img list ...')
|
@@ -658,8 +657,6 @@ def build_app():
|
|
658 |
if __name__ == '__main__':
|
659 |
import argparse
|
660 |
|
661 |
-
gr.Interface(fn=my_gpu_function, inputs="text", outputs="text")
|
662 |
-
|
663 |
parser = argparse.ArgumentParser()
|
664 |
parser.add_argument("--model_path", type=str, default='tencent/Hunyuan3D-2mv')
|
665 |
parser.add_argument("--subfolder", type=str, default='hunyuan3d-dit-v2-mv-turbo')
|
@@ -700,6 +697,8 @@ if __name__ == '__main__':
|
|
700 |
border-color: #e5e7eb; order-style: solid; border-width: 1px;'>
|
701 |
</div>
|
702 |
"""
|
|
|
|
|
703 |
example_is = get_example_img_list()
|
704 |
example_ts = get_example_txt_list()
|
705 |
example_mvs = get_example_mv_list()
|
|
|
41 |
subprocess.run(shlex.split("pip install custom_rasterizer-0.1-cp310-cp310-linux_x86_64.whl"), check=True)
|
42 |
|
43 |
@spaces.GPU
|
44 |
+
def my_gpu_function():
|
45 |
+
return "my_gpu_function processed on GPU"
|
|
|
46 |
|
47 |
def get_example_img_list():
|
48 |
print('Loading example img list ...')
|
|
|
657 |
if __name__ == '__main__':
|
658 |
import argparse
|
659 |
|
|
|
|
|
660 |
parser = argparse.ArgumentParser()
|
661 |
parser.add_argument("--model_path", type=str, default='tencent/Hunyuan3D-2mv')
|
662 |
parser.add_argument("--subfolder", type=str, default='hunyuan3d-dit-v2-mv-turbo')
|
|
|
697 |
border-color: #e5e7eb; order-style: solid; border-width: 1px;'>
|
698 |
</div>
|
699 |
"""
|
700 |
+
|
701 |
+
my_gpu_function = my_gpu_function()
|
702 |
example_is = get_example_img_list()
|
703 |
example_ts = get_example_txt_list()
|
704 |
example_mvs = get_example_mv_list()
|