Spaces:
Runtime error
Runtime error
Commit
·
c54a918
1
Parent(s):
2f33c2b
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,93 +67,11 @@ def chat(user_input,history):
|
|
| 67 |
def clear_everything():
|
| 68 |
return (None, None, None)
|
| 69 |
|
| 70 |
-
|
| 71 |
-
custom_theme = gr.themes.Monochrome()
|
| 72 |
-
|
| 73 |
-
# CSS
|
| 74 |
-
colors = ["#64A087", "green", "black"]
|
| 75 |
-
|
| 76 |
-
CSS = """
|
| 77 |
-
#question input {
|
| 78 |
-
font-size: 16px;
|
| 79 |
-
}
|
| 80 |
-
#app-title {
|
| 81 |
-
width: 100%;
|
| 82 |
-
margin: auto;
|
| 83 |
-
}
|
| 84 |
-
#url-textbox {
|
| 85 |
-
padding: 0 !important;
|
| 86 |
-
}
|
| 87 |
-
#short-upload-box .w-full {
|
| 88 |
-
min-height: 10rem !important;
|
| 89 |
-
}
|
| 90 |
-
|
| 91 |
-
#select-a-file {
|
| 92 |
-
display: block;
|
| 93 |
-
width: 100%;
|
| 94 |
-
}
|
| 95 |
-
#file-clear {
|
| 96 |
-
padding-top: 2px !important;
|
| 97 |
-
padding-bottom: 2px !important;
|
| 98 |
-
padding-left: 8px !important;
|
| 99 |
-
padding-right: 8px !important;
|
| 100 |
-
margin-top: 10px;
|
| 101 |
-
}
|
| 102 |
-
.gradio-container .gr-button-primary {
|
| 103 |
-
background: linear-gradient(180deg, #CDF9BE 0%, #AFF497 100%);
|
| 104 |
-
border: 1px solid #B0DCCC;
|
| 105 |
-
border-radius: 8px;
|
| 106 |
-
color: #1B8700;
|
| 107 |
-
}
|
| 108 |
-
.gradio-container.dark button#submit-button {
|
| 109 |
-
background: linear-gradient(180deg, #CDF9BE 0%, #AFF497 100%);
|
| 110 |
-
border: 1px solid #B0DCCC;
|
| 111 |
-
border-radius: 8px;
|
| 112 |
-
color: #1B8700
|
| 113 |
-
}
|
| 114 |
-
table.gr-samples-table tr td {
|
| 115 |
-
border: none;
|
| 116 |
-
outline: none;
|
| 117 |
-
}
|
| 118 |
-
table.gr-samples-table tr td:first-of-type {
|
| 119 |
-
width: 0%;
|
| 120 |
-
}
|
| 121 |
-
div#short-upload-box div.absolute {
|
| 122 |
-
display: none !important;
|
| 123 |
-
}
|
| 124 |
-
gradio-app > div > div > div > div.w-full > div, .gradio-app > div > div > div > div.w-full > div {
|
| 125 |
-
gap: 0px 2%;
|
| 126 |
-
}
|
| 127 |
-
gradio-app div div div div.w-full, .gradio-app div div div div.w-full {
|
| 128 |
-
gap: 0px;
|
| 129 |
-
}
|
| 130 |
-
gradio-app h2, .gradio-app h2 {
|
| 131 |
-
padding-top: 10px;
|
| 132 |
-
}
|
| 133 |
-
#answer {
|
| 134 |
-
overflow-y: scroll;
|
| 135 |
-
color: white;
|
| 136 |
-
background: #666;
|
| 137 |
-
border-color: #666;
|
| 138 |
-
font-size: 20px;
|
| 139 |
-
font-weight: bold;
|
| 140 |
-
}
|
| 141 |
-
#answer span {
|
| 142 |
-
color: white;
|
| 143 |
-
}
|
| 144 |
-
#answer textarea {
|
| 145 |
-
color:white;
|
| 146 |
-
background: #777;
|
| 147 |
-
border-color: #777;
|
| 148 |
-
font-size: 18px;
|
| 149 |
-
}
|
| 150 |
-
#url-error input {
|
| 151 |
-
color: red;
|
| 152 |
-
}
|
| 153 |
-
"""
|
| 154 |
|
| 155 |
# UI Design and Logic
|
| 156 |
-
with gr.Blocks(
|
| 157 |
gr.HTML("<h1 style='text-align: center;'>Marketing Email Generator</h1>")
|
| 158 |
gr.Markdown("Drop you Excel file here 👇 and ask your query about it!")
|
| 159 |
with gr.Row():
|
|
|
|
| 67 |
def clear_everything():
|
| 68 |
return (None, None, None)
|
| 69 |
|
| 70 |
+
# Adding themes in UI Interface
|
| 71 |
+
custom_theme = gr.themes.Monochrome()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
# UI Design and Logic
|
| 74 |
+
with gr.Blocks(theme=custom_theme,title="Marketing Email Generator") as demo:
|
| 75 |
gr.HTML("<h1 style='text-align: center;'>Marketing Email Generator</h1>")
|
| 76 |
gr.Markdown("Drop you Excel file here 👇 and ask your query about it!")
|
| 77 |
with gr.Row():
|