gradio / text2image.py
reisarod's picture
Upload folder using huggingface_hub
70edc2e verified
raw
history blame contribute delete
392 Bytes
from gradio_client import Client, handle_file
client = Client("ysharma/Text_Behind_Image")
result = client.predict(
input_image=handle_file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),
text="Hello!!",
font_size=400,
color="White",
opacity=255,
x_position=50,
y_position=50,
thickness=0,
api_name="/add_text_to_image"
)
print(result)