刘虹雨 commited on
Commit
e8296b3
·
1 Parent(s): 78b73ce

update code

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -305,8 +305,8 @@ def prepare_working_dir(dir, style):
305
  def launch_pretrained():
306
 
307
  from huggingface_hub import snapshot_download
308
- os.system("pip uninstall torch")
309
- os.system("pip uninstall torchvision")
310
  os.system("pip install https://download.pytorch.org/whl/cu121/torch-2.4.1%2Bcu121-cp310-cp310-linux_x86_64.whl")
311
  os.system("pip install https://download.pytorch.org/whl/cu121/torchvision-0.19.1%2Bcu121-cp310-cp310-linux_x86_64.whl")
312
  snapshot_download(
@@ -785,7 +785,7 @@ def launch_gradio_app():
785
  with gr.TabItem('🎨 Upload Image'):
786
  input_image = gr.Image(
787
  label="Upload Source Image",
788
- value=os.path.join(image_folder, '02057_(2).png'),
789
  image_mode="RGB", height=512, container=True,
790
  sources="upload", type="filepath"
791
  )
 
305
  def launch_pretrained():
306
 
307
  from huggingface_hub import snapshot_download
308
+ os.system("pip uninstall torch -y")
309
+ os.system("pip uninstall torchvision -y")
310
  os.system("pip install https://download.pytorch.org/whl/cu121/torch-2.4.1%2Bcu121-cp310-cp310-linux_x86_64.whl")
311
  os.system("pip install https://download.pytorch.org/whl/cu121/torchvision-0.19.1%2Bcu121-cp310-cp310-linux_x86_64.whl")
312
  snapshot_download(
 
785
  with gr.TabItem('🎨 Upload Image'):
786
  input_image = gr.Image(
787
  label="Upload Source Image",
788
+ value=os.path.join(image_folder, '02057_2.png'),
789
  image_mode="RGB", height=512, container=True,
790
  sources="upload", type="filepath"
791
  )