Spaces:
Runtime error
Runtime error
Update app.py
#17
by
Aditibaheti
- opened
app.py
CHANGED
|
@@ -59,9 +59,50 @@ examples = [
|
|
| 59 |
]
|
| 60 |
|
| 61 |
css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
#col-container {
|
| 63 |
margin: 0 auto;
|
| 64 |
-
max-width:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
}
|
| 66 |
"""
|
| 67 |
|
|
@@ -73,7 +114,7 @@ else:
|
|
| 73 |
with gr.Blocks(css=css) as demo:
|
| 74 |
with gr.Column(elem_id="col-container"):
|
| 75 |
gr.Markdown(f"""
|
| 76 |
-
# Text-to-Image
|
| 77 |
Currently running on {power_device}.
|
| 78 |
""")
|
| 79 |
|
|
@@ -86,7 +127,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 86 |
container=False,
|
| 87 |
)
|
| 88 |
|
| 89 |
-
run_button = gr.Button("
|
| 90 |
|
| 91 |
result = gr.Image(label="Result", show_label=False)
|
| 92 |
|
|
|
|
| 59 |
]
|
| 60 |
|
| 61 |
css = """
|
| 62 |
+
body {
|
| 63 |
+
background-color: #ffffff; /* Myntra's white background */
|
| 64 |
+
color: #282c3f; /* Myntra's primary text color */
|
| 65 |
+
font-family: 'Arial', sans-serif;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
#col-container {
|
| 69 |
margin: 0 auto;
|
| 70 |
+
max-width: 720px;
|
| 71 |
+
padding: 20px;
|
| 72 |
+
border: 1px solid #ebebeb;
|
| 73 |
+
border-radius: 8px;
|
| 74 |
+
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.gr-button {
|
| 78 |
+
background-color: #ff3f6c; /* Myntra's pink color */
|
| 79 |
+
color: white;
|
| 80 |
+
border: none;
|
| 81 |
+
padding: 10px 20px;
|
| 82 |
+
font-size: 16px;
|
| 83 |
+
border-radius: 5px;
|
| 84 |
+
cursor: pointer;
|
| 85 |
+
margin-top: 10px;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
.gr-button:hover {
|
| 89 |
+
background-color: #e62e5c; /* Darker shade for hover effect */
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
.gr-textbox, .gr-slider, .gr-checkbox, .gr-accordion {
|
| 93 |
+
margin-bottom: 20px;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
.gr-markdown {
|
| 97 |
+
text-align: center;
|
| 98 |
+
font-size: 24px;
|
| 99 |
+
margin-bottom: 20px;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
.gr-image {
|
| 103 |
+
border: 1px solid #ebebeb;
|
| 104 |
+
border-radius: 8px;
|
| 105 |
+
margin-top: 20px;
|
| 106 |
}
|
| 107 |
"""
|
| 108 |
|
|
|
|
| 114 |
with gr.Blocks(css=css) as demo:
|
| 115 |
with gr.Column(elem_id="col-container"):
|
| 116 |
gr.Markdown(f"""
|
| 117 |
+
# Text-to-Image Generation
|
| 118 |
Currently running on {power_device}.
|
| 119 |
""")
|
| 120 |
|
|
|
|
| 127 |
container=False,
|
| 128 |
)
|
| 129 |
|
| 130 |
+
run_button = gr.Button("Generate", scale=0)
|
| 131 |
|
| 132 |
result = gr.Image(label="Result", show_label=False)
|
| 133 |
|