File size: 1,043 Bytes
a9ea2c3
 
 
 
 
 
 
cb9a9ef
 
 
 
a9ea2c3
 
cb9a9ef
 
a9ea2c3
08d5af6
a9ea2c3
 
 
 
 
 
0e1aa7f
a9ea2c3
 
 
0e1aa7f
 
 
 
 
 
a9ea2c3
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import gradio as gr
import requests
import base64
from PIL import Image
import io

def generate_image(prompt):
    #url = "https://46dc2628-cfb9-4837-b979-2dd9940ee82e.id.repl.co/generate_image?prompt="+prompt
    #response = requests.get(url, timeout=999)
    #data = response.json()
    #base64_image = data["image"]

    # Decode the base64 image data
    #image_data = base64.b64decode(base64_image)
    #image = Image.open(io.BytesIO(image_data))
    
    return None

iface = gr.Interface(
    fn=generate_image,
    inputs="text",
    outputs="image",
    title="Midjourney2.0",
    description="Anything Possible<br><h3>Try also on Discord: <a href='https://discord.gg/d6wR8u6wnA'>https://discord.gg/d6wR8u6wnA</a></h3>",
    allow_flagging=False,
    layout="horizontal",
    theme="default",
    examples=[
        "burger",
        "really cute cat emoji, white background, blue eyes, black fur, white top fur, pink inner ears",
        "Minecraft: \"House\"",
        "Cat with speech bubble, saying \"Hi\""
    ]
)

iface.launch()