update the success debug file
Browse files- app_dev_debug.py +35 -2
app_dev_debug.py
CHANGED
@@ -760,6 +760,38 @@ def start_controller():
|
|
760 |
|
761 |
def start_worker():
|
762 |
return subprocess.Popen(['python', '-m', 'llava.serve.model_worker', '--host', '0.0.0.0', '--controller', 'http://localhost:10000', '--model-path', 'liuhaotian/llava-v1.5-7b'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
763 |
|
764 |
if __name__ == "__main__":
|
765 |
parser = argparse.ArgumentParser()
|
@@ -776,12 +808,13 @@ if __name__ == "__main__":
|
|
776 |
|
777 |
logger.info(f"args: {args}")
|
778 |
|
779 |
-
|
|
|
780 |
controller_proc = start_controller()
|
781 |
|
782 |
worker_proc = start_worker()
|
783 |
|
784 |
-
time.sleep(
|
785 |
try:
|
786 |
start_demo(args)
|
787 |
except Exception as e:
|
|
|
760 |
|
761 |
def start_worker():
|
762 |
return subprocess.Popen(['python', '-m', 'llava.serve.model_worker', '--host', '0.0.0.0', '--controller', 'http://localhost:10000', '--model-path', 'liuhaotian/llava-v1.5-7b'])
|
763 |
+
def download_llava():
|
764 |
+
command = ['huggingface-cli', 'download', '--resume-download', 'liuhaotian/llava-v1.5-7b']
|
765 |
+
|
766 |
+
# Capture the output and errors
|
767 |
+
result = subprocess.run(command, capture_output=True, text=True)
|
768 |
+
|
769 |
+
# Print output and error (if any)
|
770 |
+
print("STDOUT:", result.stdout)
|
771 |
+
print("STDERR:", result.stderr)
|
772 |
+
|
773 |
+
# Check if the command was successful (exit code 0 means success)
|
774 |
+
if result.returncode == 0:
|
775 |
+
print("Download completed successfully.")
|
776 |
+
else:
|
777 |
+
print("Download failed.")
|
778 |
+
|
779 |
+
|
780 |
+
def download_clip():
|
781 |
+
command = ['huggingface-cli', 'download', '--resume-download', 'openai/clip-vit-large-patch14-336']
|
782 |
+
|
783 |
+
# Capture the output and errors
|
784 |
+
result = subprocess.run(command, capture_output=True, text=True)
|
785 |
+
|
786 |
+
# Print output and error (if any)
|
787 |
+
print("STDOUT:", result.stdout)
|
788 |
+
print("STDERR:", result.stderr)
|
789 |
+
|
790 |
+
# Check if the command was successful (exit code 0 means success)
|
791 |
+
if result.returncode == 0:
|
792 |
+
print("Download completed successfully.")
|
793 |
+
else:
|
794 |
+
print("Download failed.")
|
795 |
|
796 |
if __name__ == "__main__":
|
797 |
parser = argparse.ArgumentParser()
|
|
|
808 |
|
809 |
logger.info(f"args: {args}")
|
810 |
|
811 |
+
download_clip()
|
812 |
+
download_llava()
|
813 |
controller_proc = start_controller()
|
814 |
|
815 |
worker_proc = start_worker()
|
816 |
|
817 |
+
time.sleep(100)
|
818 |
try:
|
819 |
start_demo(args)
|
820 |
except Exception as e:
|