shubhamofbce commited on
Commit
79e6176
1 Parent(s): 1db95a3

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app.py +8 -4
  2. requirements.txt +74 -0
app.py CHANGED
@@ -1,8 +1,12 @@
 
1
  import gradio as gr
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!"
 
 
 
5
 
6
- demo = gr.Interface(fn=greet, inputs="textbox", outputs="textbox")
7
-
8
  demo.launch()
 
1
+ import torch
2
  import gradio as gr
3
+ from diffusers import StableDiffusionPipeline
4
 
5
+ pipe = StableDiffusionPipeline.from_pretrained(
6
+ "runwayml/stable-diffusion-v1-5",
7
+ torch_dtype=torch.float16,
8
+ use_safetensors=True,
9
+ )
10
 
11
+ demo = gr.Interface.from_pipeline(pipe)
 
12
  demo.launch()
requirements.txt CHANGED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==23.2.1
2
+ altair==5.2.0
3
+ annotated-types==0.6.0
4
+ anyio==4.3.0
5
+ attrs==23.2.0
6
+ certifi==2024.2.2
7
+ charset-normalizer==3.3.2
8
+ click==8.1.7
9
+ colorama==0.4.6
10
+ contourpy==1.2.0
11
+ cycler==0.12.1
12
+ diffusers==0.26.3
13
+ fastapi==0.110.0
14
+ ffmpy==0.3.2
15
+ filelock==3.13.1
16
+ fonttools==4.49.0
17
+ fsspec==2024.2.0
18
+ gradio==4.21.0
19
+ gradio_client==0.12.0
20
+ h11==0.14.0
21
+ httpcore==1.0.4
22
+ httpx==0.27.0
23
+ huggingface-hub==0.21.4
24
+ idna==3.6
25
+ importlib_metadata==7.0.2
26
+ importlib_resources==6.1.3
27
+ Jinja2==3.1.3
28
+ jsonschema==4.21.1
29
+ jsonschema-specifications==2023.12.1
30
+ kiwisolver==1.4.5
31
+ markdown-it-py==3.0.0
32
+ MarkupSafe==2.1.5
33
+ matplotlib==3.8.3
34
+ mdurl==0.1.2
35
+ mpmath==1.3.0
36
+ networkx==3.2.1
37
+ numpy==1.26.4
38
+ orjson==3.9.15
39
+ packaging==24.0
40
+ pandas==2.2.1
41
+ pillow==10.2.0
42
+ pydantic==2.6.3
43
+ pydantic_core==2.16.3
44
+ pydub==0.25.1
45
+ Pygments==2.17.2
46
+ pyparsing==3.1.2
47
+ python-dateutil==2.9.0.post0
48
+ python-multipart==0.0.9
49
+ pytz==2024.1
50
+ PyYAML==6.0.1
51
+ referencing==0.33.0
52
+ regex==2023.12.25
53
+ requests==2.31.0
54
+ rich==13.7.1
55
+ rpds-py==0.18.0
56
+ ruff==0.3.2
57
+ safetensors==0.4.2
58
+ semantic-version==2.10.0
59
+ shellingham==1.5.4
60
+ six==1.16.0
61
+ sniffio==1.3.1
62
+ starlette==0.36.3
63
+ sympy==1.12
64
+ tomlkit==0.12.0
65
+ toolz==0.12.1
66
+ torch==2.2.1
67
+ tqdm==4.66.2
68
+ typer==0.9.0
69
+ typing_extensions==4.10.0
70
+ tzdata==2024.1
71
+ urllib3==2.2.1
72
+ uvicorn==0.28.0
73
+ websockets==11.0.3
74
+ zipp==3.17.0