|
import gradio as gr |
|
import requests |
|
|
|
url = "https://api.prodia.com/v1/job" |
|
|
|
payload = { "model": "timeless-1.0.ckpt [7c4971d4]" } |
|
headers = { |
|
"accept": "application/json", |
|
"content-type": "application/json", |
|
"X-Prodia-Key": "69e66898-010d-4cd1-9e22-090f73ad007b" |
|
} |
|
|
|
response = requests.post(url, json=payload, headers=headers) |
|
|
|
print(response.text) |
|
|
|
response = requests.post(url, headers=headers) |
|
|
|
print(response.text) |
|
|
|
|
|
def generate(prompts): |
|
images = generator(list(prompts)).images |
|
return [images] |
|
|
|
demo = gr.Interface(generate, |
|
"textbox", |
|
"image", |
|
batch=True, |
|
max_batch_size=4 |
|
).queue() |
|
|
|
if __name__ == "__main__": |
|
demo.launch() |
|
|