added space decor
Browse files- .gitignore +1 -0
- app.py +2 -0
- requirements.txt +5 -0
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
venv/
|
app.py
CHANGED
|
@@ -2,6 +2,7 @@ import torch
|
|
| 2 |
import gradio as gr
|
| 3 |
from diffusers import DiffusionPipeline
|
| 4 |
import os
|
|
|
|
| 5 |
|
| 6 |
# UI
|
| 7 |
DESCRIPTION = '''
|
|
@@ -15,6 +16,7 @@ DESCRIPTION = '''
|
|
| 15 |
pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, use_safetensors=True, variant="fp16").to('cuda')
|
| 16 |
|
| 17 |
# function to take input and generate text tokena
|
|
|
|
| 18 |
def osiris(prompt: str,
|
| 19 |
history: list,
|
| 20 |
temperature: float,
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
from diffusers import DiffusionPipeline
|
| 4 |
import os
|
| 5 |
+
import spaces
|
| 6 |
|
| 7 |
# UI
|
| 8 |
DESCRIPTION = '''
|
|
|
|
| 16 |
pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, use_safetensors=True, variant="fp16").to('cuda')
|
| 17 |
|
| 18 |
# function to take input and generate text tokena
|
| 19 |
+
@spaces.GPU(duration=120)
|
| 20 |
def osiris(prompt: str,
|
| 21 |
history: list,
|
| 22 |
temperature: float,
|
requirements.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
torch
|
| 2 |
+
transformers
|
| 3 |
+
huggingface_hub
|
| 4 |
+
gradio
|
| 5 |
+
diffusers
|