svjack commited on
Commit
b34384b
·
verified ·
1 Parent(s): f7d6087

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -3
app.py CHANGED
@@ -1,4 +1,20 @@
1
- import spaces
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  import torch
4
  import torchvision.transforms.functional as TF
@@ -79,7 +95,7 @@ pipe.fuse_lora()
79
  pipe.to(device)
80
 
81
 
82
- @spaces.GPU()
83
  def generate_image(
84
  upload_images,
85
  prompt,
@@ -430,4 +446,4 @@ with gr.Blocks(css=css) as demo:
430
 
431
  gr.Markdown(article)
432
 
433
- demo.launch()
 
1
+ '''
2
+ sudo apt-get update && sudo apt-get install git-lfs ffmpeg cbm
3
+ # Clone this repository
4
+ git clone https://huggingface.co/spaces/svjack/PhotoMaker-V2
5
+ # Go into the repository
6
+ cd PhotoMaker-V2
7
+ ### Install dependencies ###
8
+ conda create --name py310 python=3.10
9
+ conda activate py310
10
+ # Install ipykernel and add the environment to Jupyter
11
+ pip install ipykernel
12
+ python -m ipykernel install --user --name py310 --display-name "py310"
13
+ pip install -r requirements.txt
14
+ python app.py
15
+ '''
16
+
17
+ #import spaces
18
 
19
  import torch
20
  import torchvision.transforms.functional as TF
 
95
  pipe.to(device)
96
 
97
 
98
+ #@spaces.GPU()
99
  def generate_image(
100
  upload_images,
101
  prompt,
 
446
 
447
  gr.Markdown(article)
448
 
449
+ demo.launch(share = True)