Spaces:
Runtime error
Runtime error
vkthakur88
commited on
Commit
•
61a7806
1
Parent(s):
94e8356
Update app.py
Browse files
app.py
CHANGED
@@ -4,10 +4,10 @@ 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(
|
9 |
prompt = f'concept art of {prompt}, crisp hand, fair skinned, fantasy art, oil painting, a detailed painting, a beautiful artwork illustration, inspired by Raja Ravi Varma, trending on cg society, ancient indian theme.',
|
10 |
-
negative_prompt = f'duplicate, fake, unrealistic, dark skinned, beard, moustache, photograph, ugly, old, 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 = guidance_scale,
|
13 |
num_inference_steps = 50,
|
@@ -19,9 +19,8 @@ def image_interface(prompt, neg_prompt, guidance_scale):
|
|
19 |
app = gr.Interface(
|
20 |
fn = image_interface,
|
21 |
inputs = [
|
22 |
-
gr.Textbox(label = 'Prompt'),
|
23 |
-
gr.
|
24 |
-
gr.Slider(minimum = 1, maximum = 30, value = 7, step = 0.5, label = 'Guidance Scale', show_label = True)
|
25 |
],
|
26 |
outputs = 'image',
|
27 |
title = 'Oil Painting Generation',
|
|
|
4 |
|
5 |
client = hf_hub.InferenceClient(token = os.environ['HF_TOKEN'])
|
6 |
|
7 |
+
def image_interface(prompt, guidance_scale):
|
8 |
response = client.text_to_image(
|
9 |
prompt = f'concept art of {prompt}, crisp hand, fair skinned, fantasy art, oil painting, a detailed painting, a beautiful artwork illustration, inspired by Raja Ravi Varma, trending on cg society, ancient indian theme.',
|
10 |
+
negative_prompt = f'duplicate, fake, unrealistic, dark skinned, beard, moustache, photograph, ugly, old, 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 = guidance_scale,
|
13 |
num_inference_steps = 50,
|
|
|
19 |
app = gr.Interface(
|
20 |
fn = image_interface,
|
21 |
inputs = [
|
22 |
+
gr.Textbox(label = 'Prompt'),
|
23 |
+
gr.Slider(minimum = 1, maximum = 30, value = 7, step = 0.1, label = 'Guidance Scale', show_label = True)
|
|
|
24 |
],
|
25 |
outputs = 'image',
|
26 |
title = 'Oil Painting Generation',
|