FermiQ commited on
Commit
a44bdd8
·
verified ·
1 Parent(s): e3a38b9

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +123 -0
app.py ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def run(image):
4
+ image = np.array(image, dtype=np.float32) / 255.0
5
+ images = multi_view_diffusion_pipeline("", image, guidance_scale=5, num_inference_steps=30, elevation=0)
6
+
7
+ images = [Image.fromarray((img * 255).astype("uint8")) for img in images]
8
+
9
+ width, height = images[0].size
10
+ grid_img = Image.new("RGB", (2 * width, 2 * height))
11
+
12
+ grid_img.paste(images[0], (0, 0))
13
+ grid_img.paste(images[1], (width, 0))
14
+ grid_img.paste(images[2], (0, height))
15
+ grid_img.paste(images[3], (width, height))
16
+
17
+ return grid_img
18
+
19
+ demo = gr.Interface(fn=run, inputs="image", outputs="image")
20
+ demo.launch()
21
+
22
+ accelerate
23
+ aiofiles==23.2.1
24
+ altair==5.2.0
25
+ annotated-types==0.6.0
26
+ anyio==4.3.0
27
+ attrs==23.2.0
28
+ certifi==2024.2.2
29
+ charset-normalizer==3.3.2
30
+ click==8.1.7
31
+ colorama==0.4.6
32
+ contourpy==1.2.0
33
+ cycler==0.12.1
34
+ diffusers==0.27.2
35
+ einops==0.7.0
36
+ exceptiongroup==1.2.0
37
+ executing==2.0.1
38
+ fastapi==0.110.0
39
+ ffmpy==0.3.2
40
+ filelock==3.13.3
41
+ fonttools==4.50.0
42
+ fsspec==2024.3.1
43
+ gradio==4.24.0
44
+ gradio_client==0.14.0
45
+ h11==0.14.0
46
+ httpcore==1.0.5
47
+ httpx==0.27.0
48
+ huggingface-hub==0.22.2
49
+ idna==3.6
50
+ importlib_metadata==7.1.0
51
+ importlib_resources==6.4.0
52
+ Jinja2==3.1.3
53
+ jsonschema==4.21.1
54
+ jsonschema-specifications==2023.12.1
55
+ kiui==0.2.7
56
+ kiwisolver==1.4.5
57
+ lazy_loader==0.3
58
+ markdown-it-py==3.0.0
59
+ MarkupSafe==2.1.5
60
+ matplotlib==3.8.3
61
+ mdurl==0.1.2
62
+ mpmath==1.3.0
63
+ networkx==3.2.1
64
+ numpy==1.26.4
65
+ nvidia-cublas-cu12==12.1.3.1
66
+ nvidia-cuda-cupti-cu12==12.1.105
67
+ nvidia-cuda-nvrtc-cu12==12.1.105
68
+ nvidia-cuda-runtime-cu12==12.1.105
69
+ nvidia-cudnn-cu12==8.9.2.26
70
+ nvidia-cufft-cu12==11.0.2.54
71
+ nvidia-curand-cu12==10.3.2.106
72
+ nvidia-cusolver-cu12==11.4.5.107
73
+ nvidia-cusparse-cu12==12.1.0.106
74
+ nvidia-nccl-cu12==2.19.3
75
+ nvidia-nvjitlink-cu12==12.4.99
76
+ nvidia-nvtx-cu12==12.1.105
77
+ objprint==0.2.3
78
+ opencv-python==4.9.0.80
79
+ orjson==3.10.0
80
+ packaging==24.0
81
+ pandas==2.2.1
82
+ pillow==10.2.0
83
+ psutil==5.9.8
84
+ pydantic==2.6.4
85
+ pydantic_core==2.16.3
86
+ pydub==0.25.1
87
+ Pygments==2.17.2
88
+ pyparsing==3.1.2
89
+ python-dateutil==2.9.0.post0
90
+ python-multipart==0.0.9
91
+ pytz==2024.1
92
+ PyYAML==6.0.1
93
+ referencing==0.34.0
94
+ regex==2023.12.25
95
+ requests==2.31.0
96
+ rich==13.7.1
97
+ rpds-py==0.18.0
98
+ ruff==0.3.4
99
+ safetensors==0.4.2
100
+ scipy==1.12.0
101
+ semantic-version==2.10.0
102
+ shellingham==1.5.4
103
+ six==1.16.0
104
+ sniffio==1.3.1
105
+ spaces==0.25.0
106
+ starlette==0.36.3
107
+ sympy==1.12
108
+ tokenizers==0.15.2
109
+ tomlkit==0.12.0
110
+ toolz==0.12.1
111
+ torch==2.2.0
112
+ tqdm==4.66.2
113
+ transformers==4.39.2
114
+ triton==2.2.0
115
+ typer==0.11.1
116
+ typing_extensions==4.10.0
117
+ tzdata==2024.1
118
+ urllib3==2.2.1
119
+ uvicorn==0.29.0
120
+ varname==0.13.0
121
+ websockets==11.0.3
122
+ xformers
123
+ zipp==3.18.1