Senqiao commited on
Commit
0cd92c0
·
1 Parent(s): e6f44db

update the 13B model

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py CHANGED
@@ -756,6 +756,10 @@ def start_controller():
756
 
757
  def start_worker():
758
  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'])
 
 
 
 
759
  def download_llava():
760
  command = ['huggingface-cli', 'download', '--resume-download', 'liuhaotian/llava-v1.5-7b']
761
 
@@ -772,6 +776,21 @@ def download_llava():
772
  else:
773
  print("Download failed.")
774
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
775
 
776
  def download_clip():
777
  command = ['huggingface-cli', 'download', '--resume-download', 'openai/clip-vit-large-patch14-336']
@@ -806,9 +825,11 @@ def download_clip():
806
 
807
  download_clip()
808
  download_llava()
 
809
  controller_proc = start_controller()
810
 
811
  worker_proc = start_worker()
 
812
 
813
  time.sleep(100)
814
  try:
@@ -818,6 +839,7 @@ def download_clip():
818
  exit_status = 1
819
  finally:
820
  worker_proc.kill()
 
821
  controller_proc.kill()
822
 
823
  sys.exit(exit_status)
 
756
 
757
  def start_worker():
758
  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'])
759
+
760
+ def start_worker_13():
761
+ return subprocess.Popen(['python', '-m', 'llava.serve.model_worker', '--host', '0.0.0.0', '--controller', 'http://localhost:10000', '--model-path', 'liuhaotian/llava-v1.5-13b'])
762
+
763
  def download_llava():
764
  command = ['huggingface-cli', 'download', '--resume-download', 'liuhaotian/llava-v1.5-7b']
765
 
 
776
  else:
777
  print("Download failed.")
778
 
779
+ def download_llava_13():
780
+ command = ['huggingface-cli', 'download', '--resume-download', 'liuhaotian/llava-v1.5-13b']
781
+
782
+ # Capture the output and errors
783
+ result = subprocess.run(command, capture_output=True, text=True)
784
+
785
+ # Print output and error (if any)
786
+ print("STDOUT:", result.stdout)
787
+ print("STDERR:", result.stderr)
788
+
789
+ # Check if the command was successful (exit code 0 means success)
790
+ if result.returncode == 0:
791
+ print("Download completed successfully.")
792
+ else:
793
+ print("Download failed.")
794
 
795
  def download_clip():
796
  command = ['huggingface-cli', 'download', '--resume-download', 'openai/clip-vit-large-patch14-336']
 
825
 
826
  download_clip()
827
  download_llava()
828
+ download_llava_13()
829
  controller_proc = start_controller()
830
 
831
  worker_proc = start_worker()
832
+ worker_proc_13 = start_worker_13()
833
 
834
  time.sleep(100)
835
  try:
 
839
  exit_status = 1
840
  finally:
841
  worker_proc.kill()
842
+ worker_proc_13.kill()
843
  controller_proc.kill()
844
 
845
  sys.exit(exit_status)