Spaces:
Runtime error
Runtime error
beyonddata
commited on
Commit
β’
f8faa63
1
Parent(s):
e837c44
Upload folder using huggingface_hub
Browse files- README.md +2 -8
- main.py +15 -0
- requirements.txt +6 -0
README.md
CHANGED
@@ -1,12 +1,6 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
|
4 |
-
colorFrom: yellow
|
5 |
-
colorTo: red
|
6 |
sdk: gradio
|
7 |
sdk_version: 3.50.2
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
---
|
11 |
-
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: diffuser2
|
3 |
+
app_file: main.py
|
|
|
|
|
4 |
sdk: gradio
|
5 |
sdk_version: 3.50.2
|
|
|
|
|
6 |
---
|
|
|
|
main.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from fastapi import FastAPI
|
2 |
+
import gradio as gr
|
3 |
+
import torch
|
4 |
+
from diffusers import DiffusionPipeline
|
5 |
+
import uvicorn
|
6 |
+
|
7 |
+
description = "Image generation with GPT-2"
|
8 |
+
title = "IMAGE GENERATION MACHINE"
|
9 |
+
|
10 |
+
pipeline3 = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", use_safetensors=False).to('cuda')
|
11 |
+
interface = gr.Interface(lambda x: pipeline3(x).images[0], 'textbox', 'image'
|
12 |
+
# description=description,
|
13 |
+
# examples=examples,
|
14 |
+
)
|
15 |
+
interface.launch(share = True)
|
requirements.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
fastapi
|
2 |
+
torch==2.1.0
|
3 |
+
uvicorn
|
4 |
+
diffusers
|
5 |
+
transformers
|
6 |
+
gradio
|