updated ui
Browse files
app.py
CHANGED
|
@@ -1131,33 +1131,65 @@ def create_gradio_interface():
|
|
| 1131 |
|
| 1132 |
with gr.Tab("π Upload Documents"):
|
| 1133 |
gr.Markdown("""
|
| 1134 |
-
|
| 1135 |
-
|
| 1136 |
-
|
| 1137 |
-
|
| 1138 |
-
|
| 1139 |
-
|
| 1140 |
-
|
| 1141 |
-
- Upload related documents together for better context
|
| 1142 |
-
- Larger documents may take 30-60 seconds to process
|
| 1143 |
-
- Images will be processed with OCR automatically
|
| 1144 |
-
- Each document gets unique tags and embeddings
|
| 1145 |
|
| 1146 |
-
|
| 1147 |
-
|
| 1148 |
-
|
| 1149 |
-
|
| 1150 |
-
|
| 1151 |
-
|
| 1152 |
-
|
| 1153 |
-
|
| 1154 |
-
|
| 1155 |
-
|
| 1156 |
-
|
| 1157 |
-
|
| 1158 |
-
|
| 1159 |
-
|
| 1160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1161 |
|
| 1162 |
with gr.Tab("π Content Studio"):
|
| 1163 |
gr.Markdown("""
|
|
|
|
| 1131 |
|
| 1132 |
with gr.Tab("π Upload Documents"):
|
| 1133 |
gr.Markdown("""
|
| 1134 |
+
### π Upload & Process Documents
|
| 1135 |
+
|
| 1136 |
+
Upload PDFs, DOCX, TXT or Images. OCR runs automatically.
|
| 1137 |
+
Once processed, the document becomes searchable and available for summaries, tagging, podcasting and RAG.
|
| 1138 |
+
""")
|
| 1139 |
+
|
| 1140 |
+
with gr.Row(equal_height=True):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1141 |
|
| 1142 |
+
# LEFT SIDE: UPLOAD PANEL
|
| 1143 |
+
with gr.Column(scale=1):
|
| 1144 |
+
with gr.Group():
|
| 1145 |
+
gr.Markdown("#### π€ Upload File")
|
| 1146 |
+
|
| 1147 |
+
file_input_upload = gr.File(
|
| 1148 |
+
label="Select a document",
|
| 1149 |
+
file_types=[".pdf", ".txt", ".docx", ".png", ".jpg", ".jpeg"],
|
| 1150 |
+
type="filepath"
|
| 1151 |
+
)
|
| 1152 |
+
|
| 1153 |
+
gr.HTML("<div style='height:10px'></div>") # spacing
|
| 1154 |
+
|
| 1155 |
+
upload_btn_process = gr.Button(
|
| 1156 |
+
"π Process & Add to Library",
|
| 1157 |
+
variant="primary",
|
| 1158 |
+
size="lg",
|
| 1159 |
+
elem_id="upload-btn"
|
| 1160 |
+
)
|
| 1161 |
+
|
| 1162 |
+
# RIGHT SIDE: STATUS PANEL
|
| 1163 |
+
with gr.Column(scale=1):
|
| 1164 |
+
with gr.Group():
|
| 1165 |
+
gr.Markdown("#### π¦ Processing Preview")
|
| 1166 |
+
|
| 1167 |
+
upload_output_display = gr.Textbox(
|
| 1168 |
+
label="Processing Status",
|
| 1169 |
+
placeholder="β³ Waiting for upload...",
|
| 1170 |
+
lines=10,
|
| 1171 |
+
interactive=False,
|
| 1172 |
+
)
|
| 1173 |
+
|
| 1174 |
+
doc_id_output_display = gr.Textbox(
|
| 1175 |
+
label="π Document ID",
|
| 1176 |
+
placeholder="Will appear after processing...",
|
| 1177 |
+
interactive=False
|
| 1178 |
+
)
|
| 1179 |
+
|
| 1180 |
+
|
| 1181 |
+
# Optional: center button styling
|
| 1182 |
+
gr.HTML("""
|
| 1183 |
+
<style>
|
| 1184 |
+
#upload-btn button {
|
| 1185 |
+
width: 100%;
|
| 1186 |
+
font-size: 18px;
|
| 1187 |
+
padding: 14px;
|
| 1188 |
+
}
|
| 1189 |
+
</style>
|
| 1190 |
+
""")
|
| 1191 |
+
|
| 1192 |
+
|
| 1193 |
|
| 1194 |
with gr.Tab("π Content Studio"):
|
| 1195 |
gr.Markdown("""
|