mesutt commited on
Commit
dedcac8
1 Parent(s): 6d03f27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -24
app.py CHANGED
@@ -15,32 +15,10 @@ def t2i(text):
15
  image = Image.open('image.png')
16
  return image
17
 
18
- # Read the image file and encode it as base64
19
- with open("./1001epochs.png", "rb") as f:
20
- image_data = f.read()
21
- image_base64 = base64.b64encode(image_data).decode("utf-8")
22
 
23
  allow_flagging = "never"
24
 
25
- title = f"""
26
- <h2 style="background-image: linear-gradient(to right, #3A5FCD, #87CEFA); -webkit-background-clip: text;
27
- -webkit-text-fill-color: transparent; text-align: center;">
28
- Text to Image Generator
29
- </h2>
30
- """
31
 
32
- description = f"""
33
- <div style="display: flex; align-items: center; justify-content: center; flex-direction: column;">
34
- <p style="font-size: 18px; color: #4AAAFF; text-align: center;">
35
- Turn words into captivating visuals effortlessly within minutes.
36
- </p>
37
- <div style="display: flex; align-items: center; margin-bottom: 0px;">
38
- <img src='data:image/jpeg;base64,{image_base64}' width='50' height='30' style="margin-right: 5px;"/>
39
- <p style="font-size: 14px; color: #555;">
40
- Disclaimer: The purpose of this application is solely for demonstration. 1001epochs does not claim ownership for the results Contact: [email protected] for full solution.
41
- </p>
42
- </div>
43
- </div>
44
- """
45
- iface = gr.Interface(fn=t2i, inputs="text", outputs=[gr.Image(label="Generated Image")], title=title, description=description).launch()
46
  iface.launch(share=True)
 
15
  image = Image.open('image.png')
16
  return image
17
 
18
+
 
 
 
19
 
20
  allow_flagging = "never"
21
 
 
 
 
 
 
 
22
 
23
+ iface = gr.Interface(fn=t2i, inputs="text", outputs=[gr.Image(label="Generated Image")]).launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  iface.launch(share=True)