Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- gradio_app.py +1 -15
- pre-requirements.txt +2 -1
gradio_app.py
CHANGED
|
@@ -592,16 +592,6 @@ def build_app():
|
|
| 592 |
outputs=[tabs_output],
|
| 593 |
)
|
| 594 |
|
| 595 |
-
# Button to trigger GPU function
|
| 596 |
-
run_button = gr.Button("")
|
| 597 |
-
|
| 598 |
-
# When button clicked -> call GPU function and update output_box
|
| 599 |
-
run_button.click(
|
| 600 |
-
fn=my_gpu_function,
|
| 601 |
-
inputs=[],
|
| 602 |
-
outputs=[]
|
| 603 |
-
)
|
| 604 |
-
|
| 605 |
def on_gen_mode_change(value):
|
| 606 |
if value == 'Turbo':
|
| 607 |
return gr.update(value=5)
|
|
@@ -668,9 +658,6 @@ def build_app():
|
|
| 668 |
|
| 669 |
|
| 670 |
if __name__ == '__main__':
|
| 671 |
-
import sys
|
| 672 |
-
print("sys.argv:", sys.argv)
|
| 673 |
-
|
| 674 |
import argparse
|
| 675 |
|
| 676 |
parser = argparse.ArgumentParser()
|
|
@@ -695,8 +682,6 @@ if __name__ == '__main__':
|
|
| 695 |
print(f"Invalid port argument detected: {args.port} β using default 7860")
|
| 696 |
port = 7860
|
| 697 |
|
| 698 |
-
print("args:", args)
|
| 699 |
-
|
| 700 |
args.enable_flashvdm = True
|
| 701 |
SAVE_DIR = args.cache_path
|
| 702 |
os.makedirs(SAVE_DIR, exist_ok=True)
|
|
@@ -722,6 +707,7 @@ if __name__ == '__main__':
|
|
| 722 |
</div>
|
| 723 |
"""
|
| 724 |
|
|
|
|
| 725 |
example_is = get_example_img_list()
|
| 726 |
example_ts = get_example_txt_list()
|
| 727 |
example_mvs = get_example_mv_list()
|
|
|
|
| 592 |
outputs=[tabs_output],
|
| 593 |
)
|
| 594 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 595 |
def on_gen_mode_change(value):
|
| 596 |
if value == 'Turbo':
|
| 597 |
return gr.update(value=5)
|
|
|
|
| 658 |
|
| 659 |
|
| 660 |
if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
|
| 661 |
import argparse
|
| 662 |
|
| 663 |
parser = argparse.ArgumentParser()
|
|
|
|
| 682 |
print(f"Invalid port argument detected: {args.port} β using default 7860")
|
| 683 |
port = 7860
|
| 684 |
|
|
|
|
|
|
|
| 685 |
args.enable_flashvdm = True
|
| 686 |
SAVE_DIR = args.cache_path
|
| 687 |
os.makedirs(SAVE_DIR, exist_ok=True)
|
|
|
|
| 707 |
</div>
|
| 708 |
"""
|
| 709 |
|
| 710 |
+
gr.Interface(fn=my_gpu_function, inputs=[], outputs="text")
|
| 711 |
example_is = get_example_img_list()
|
| 712 |
example_ts = get_example_txt_list()
|
| 713 |
example_mvs = get_example_mv_list()
|
pre-requirements.txt
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
-
|
|
|
|
|
|
| 1 |
+
huggingface_hub
|
| 2 |
+
pip==25.1.1
|