Spaces:
Runtime error
Runtime error
Commit
·
e05c2cb
1
Parent(s):
22d9d60
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import os
|
|
2 |
import huggingface_hub as hf_hub
|
3 |
import gradio as gr
|
4 |
|
5 |
-
client = hf_hub.InferenceClient(token = os.environ['HF_TOKEN']
|
6 |
|
7 |
def image_interface(prompt):
|
8 |
response = client.text_to_image(
|
@@ -10,7 +10,7 @@ def image_interface(prompt):
|
|
10 |
negative_prompt = 'naked, nsfw, duplicate, photograph, ugly, bad anatomy, bad hands, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, worst face, three crus, extra crus, fused crus, worst feet, three feet, fused feet, fused thigh, three thigh, fused thigh, extra thigh, worst thigh, missing fingers, extra fingers, ugly fingers, long fingers, horn, extra eyes, huge eyes, 2girl, amputation, disconnected limbs',
|
11 |
model = 'stabilityai/stable-diffusion-xl-base-1.0',
|
12 |
guidance_scale = 8,
|
13 |
-
num_inference_steps =
|
14 |
)
|
15 |
|
16 |
return response
|
|
|
2 |
import huggingface_hub as hf_hub
|
3 |
import gradio as gr
|
4 |
|
5 |
+
client = hf_hub.InferenceClient(token = os.environ['HF_TOKEN'])
|
6 |
|
7 |
def image_interface(prompt):
|
8 |
response = client.text_to_image(
|
|
|
10 |
negative_prompt = 'naked, nsfw, duplicate, photograph, ugly, bad anatomy, bad hands, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, worst face, three crus, extra crus, fused crus, worst feet, three feet, fused feet, fused thigh, three thigh, fused thigh, extra thigh, worst thigh, missing fingers, extra fingers, ugly fingers, long fingers, horn, extra eyes, huge eyes, 2girl, amputation, disconnected limbs',
|
11 |
model = 'stabilityai/stable-diffusion-xl-base-1.0',
|
12 |
guidance_scale = 8,
|
13 |
+
num_inference_steps = 50
|
14 |
)
|
15 |
|
16 |
return response
|