MaxMilan1 commited on
Commit
a2559bc
·
1 Parent(s): 82af72d
Files changed (2) hide show
  1. app.py +13 -13
  2. requirements.txt +5 -14
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from util.text_img import generate_image
3
  from util.v3d import generate_v3d, prep
4
 
5
  # Prepare the V3D model
@@ -7,19 +7,19 @@ model, clip_model, ae_model, device, num_frames, num_steps, rembg_session, outpu
7
 
8
  _TITLE = "Shoe Generator"
9
  with gr.Blocks(_TITLE) as ShoeGen:
10
- with gr.Tab("Text to Image Generator"):
11
- with gr.Row():
12
- with gr.Column():
13
- prompt = gr.Textbox(label="Enter a discription of a shoe")
14
- # neg_prompt = gr.Textbox(label="Enter a negative prompt", value="low quality, watermark, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, body out of frame, blurry, bad anatomy, blurred, watermark, grainy, signature, cut off, draft, closed eyes, text, logo")
15
- button_gen = gr.Button("Generate Image")
16
- with gr.Column():
17
- with gr.Tab("With Background"):
18
- image = gr.Image(label="Generated Image", show_download_button=True, show_label=False)
19
- with gr.Tab("Without Background"):
20
- image_nobg = gr.Image(label="Generated Image", show_download_button=True, show_label=False)
21
 
22
- button_gen.click(generate_image, inputs=[prompt], outputs=[image, image_nobg])
23
 
24
  with gr.Tab("Image to Video Generator (V3D)"):
25
  with gr.Row(equal_height=True):
 
1
  import gradio as gr
2
+ # from util.text_img import generate_image
3
  from util.v3d import generate_v3d, prep
4
 
5
  # Prepare the V3D model
 
7
 
8
  _TITLE = "Shoe Generator"
9
  with gr.Blocks(_TITLE) as ShoeGen:
10
+ # with gr.Tab("Text to Image Generator"):
11
+ # with gr.Row():
12
+ # with gr.Column():
13
+ # prompt = gr.Textbox(label="Enter a discription of a shoe")
14
+ # # neg_prompt = gr.Textbox(label="Enter a negative prompt", value="low quality, watermark, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, body out of frame, blurry, bad anatomy, blurred, watermark, grainy, signature, cut off, draft, closed eyes, text, logo")
15
+ # button_gen = gr.Button("Generate Image")
16
+ # with gr.Column():
17
+ # with gr.Tab("With Background"):
18
+ # image = gr.Image(label="Generated Image", show_download_button=True, show_label=False)
19
+ # with gr.Tab("Without Background"):
20
+ # image_nobg = gr.Image(label="Generated Image", show_download_button=True, show_label=False)
21
 
22
+ # button_gen.click(generate_image, inputs=[prompt], outputs=[image, image_nobg])
23
 
24
  with gr.Tab("Image to Video Generator (V3D)"):
25
  with gr.Row(equal_height=True):
requirements.txt CHANGED
@@ -1,4 +1,3 @@
1
- # imports for image-to-V3D
2
  black==23.7.0
3
  chardet==5.1.0
4
  clip @ git+https://github.com/openai/CLIP.git
@@ -21,24 +20,24 @@ pudb>=2022.1.3
21
  pytorch-lightning==2.0.1
22
  pyyaml>=6.0.1
23
  scipy>=1.10.1
24
- # streamlit>=0.73.1
25
  tensorboardx==2.6
26
  timm>=0.9.2
27
- # tokenizers==0.12.1
28
  torch==2.0.1
29
  torchaudio>=2.0.2
30
  torchdata==0.6.1
31
  torchmetrics>=1.0.1
32
  torchvision>=0.15.2
33
  tqdm>=4.65.0
34
- # transformers==4.19.1
35
  # triton==2.0.0
36
  urllib3<1.27,>=1.25.4
37
  wandb>=0.15.6
38
  webdataset>=0.2.33
39
  wheel>=0.41.0
40
  xformers>=0.0.20
41
- # streamlit-keyup==0.2.0
42
  mediapy
43
  tyro
44
  wget
@@ -46,12 +45,4 @@ rembg
46
  kiui
47
  spaces
48
  imageio==2.19.3
49
- imageio-ffmpeg==0.4.7
50
-
51
- # imports for text-to-image
52
- gradio
53
- diffusers==0.26.3
54
- transformers==4.38.1
55
- accelerate==0.27.2
56
- Python-IO
57
- huggingface-hub
 
 
1
  black==23.7.0
2
  chardet==5.1.0
3
  clip @ git+https://github.com/openai/CLIP.git
 
20
  pytorch-lightning==2.0.1
21
  pyyaml>=6.0.1
22
  scipy>=1.10.1
23
+ streamlit>=0.73.1
24
  tensorboardx==2.6
25
  timm>=0.9.2
26
+ tokenizers==0.12.1
27
  torch==2.0.1
28
  torchaudio>=2.0.2
29
  torchdata==0.6.1
30
  torchmetrics>=1.0.1
31
  torchvision>=0.15.2
32
  tqdm>=4.65.0
33
+ transformers==4.19.1
34
  # triton==2.0.0
35
  urllib3<1.27,>=1.25.4
36
  wandb>=0.15.6
37
  webdataset>=0.2.33
38
  wheel>=0.41.0
39
  xformers>=0.0.20
40
+ streamlit-keyup==0.2.0
41
  mediapy
42
  tyro
43
  wget
 
45
  kiui
46
  spaces
47
  imageio==2.19.3
48
+ imageio-ffmpeg==0.4.7