oil_painting / app.py
vkthakur88's picture
Update app.py
0e24e63
import os
import huggingface_hub as hf_hub
import gradio as gr
client = hf_hub.InferenceClient(token = os.environ['HF_TOKEN'])
def image_interface(prompt):
response = client.text_to_image(
prompt = f'fantasy art, oil painting, in raja ravi verma style, ancient indian theme, painting of {prompt}.',
negative_prompt = 'duplicate, 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',
model = 'stabilityai/stable-diffusion-xl-base-1.0',
guidance_scale = 7,
num_inference_steps = 50
)
return response
app = gr.Interface(
fn = image_interface,
inputs = 'text',
outputs = 'image',
title = 'Oil Painting Generation',
description = 'Vinay Kumar Thakur'
)
app.launch()