KajetanNiewczas commited on
Commit
fcd33bb
·
1 Parent(s): 8965458

Reorganize the bottom layout, add Credits section

Browse files
gfx/github-mark-white.png ADDED

Git LFS Details

  • SHA256: 60d03f0f1a09aafcc2df2e10b4ffd24eab44787b451f8fdb367c3baf589cf95a
  • Pointer size: 129 Bytes
  • Size of remote file: 4.84 kB
src/interface/gradio_interface.py CHANGED
@@ -74,6 +74,7 @@ def encode_image(image_path):
74
 
75
 
76
  image_base64 = encode_image("gfx/long_logo.png")
 
77
 
78
 
79
  with gr.Blocks(theme=theme, js=js_func) as demo:
@@ -205,7 +206,27 @@ with gr.Blocks(theme=theme, js=js_func) as demo:
205
  )
206
  submit_topic_button = gr.Button("Generate Presentation", variant="primary")
207
 
208
- gr.Markdown("## ⭐ Rate Us")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  rating = gr.Radio(
210
  choices=["⭐️", "⭐️⭐️", "⭐️⭐️⭐️", "⭐️⭐️⭐️⭐️", "⭐️⭐️⭐️⭐️⭐️"],
211
  label="How would you rate this app?",
@@ -222,24 +243,61 @@ with gr.Blocks(theme=theme, js=js_func) as demo:
222
  max_lines=5,
223
  interactive=True,
224
  )
 
225
  submit_feedback_button = gr.Button("Submit Feedback", variant="secondary")
226
- feedback_output = gr.Textbox(label="Feedback Status", interactive=False)
227
 
 
 
228
  with gr.Column(scale=1):
229
- gr.Markdown("## 📄 Uploaded Files")
230
- upload_output = gr.Textbox(
231
- label="Upload Status", lines=3, interactive=False
 
 
 
232
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
 
234
- gr.Markdown("## 📝 Presentation Processing")
235
- compilation_status = gr.Textbox(
236
- label="Compilation Status", lines=1, interactive=False
 
 
237
  )
238
-
239
- gr.Markdown("## 🎉 Final Presentation")
240
- pdf_output = gr.File(label="Download/View Presentation", interactive=False, elem_id="download-box")
241
- pdf_output_viewer = gr.HTML(label="Presentation Preview")
242
- trace_id_state = gr.State("")
243
 
244
  upload_button.click(
245
  fn=upload_and_update_list,
 
74
 
75
 
76
  image_base64 = encode_image("gfx/long_logo.png")
77
+ github_base64 = encode_image("gfx/github-mark-white.png")
78
 
79
 
80
  with gr.Blocks(theme=theme, js=js_func) as demo:
 
206
  )
207
  submit_topic_button = gr.Button("Generate Presentation", variant="primary")
208
 
209
+ with gr.Column(scale=1):
210
+ gr.Markdown("## 📄 Uploaded Files")
211
+ upload_output = gr.Textbox(
212
+ label="Upload Status", lines=3, interactive=False
213
+ )
214
+
215
+ gr.Markdown("## 📝 Presentation Processing")
216
+ compilation_status = gr.Textbox(
217
+ label="Compilation Status", lines=1, interactive=False
218
+ )
219
+
220
+ gr.Markdown("## 🎉 Final Presentation")
221
+ pdf_output = gr.File(label="Download/View Presentation", interactive=False, elem_id="download-box")
222
+ pdf_output_viewer = gr.HTML(label="Presentation Preview")
223
+ trace_id_state = gr.State("")
224
+
225
+ gr.Markdown("<br>")
226
+
227
+ gr.Markdown("## ⭐ Rate Us")
228
+ with gr.Row():
229
+ with gr.Column(scale=1):
230
  rating = gr.Radio(
231
  choices=["⭐️", "⭐️⭐️", "⭐️⭐️⭐️", "⭐️⭐️⭐️⭐️", "⭐️⭐️⭐️⭐️⭐️"],
232
  label="How would you rate this app?",
 
243
  max_lines=5,
244
  interactive=True,
245
  )
246
+ with gr.Column(scale=1):
247
  submit_feedback_button = gr.Button("Submit Feedback", variant="secondary")
248
+ feedback_output = gr.Textbox(label="Feedback Status", interactive=False, lines=4)
249
 
250
+ gr.Markdown("## 🙌 Credits")
251
+ with gr.Row():
252
  with gr.Column(scale=1):
253
+ gr.Markdown(
254
+ '<div style="text-align:justify; margin-top: 0px;">'
255
+ "RAG'n'TeX is a collaborative effort by a team of developers and researchers driven "
256
+ "to make the everyday work of scientists and professionals easier. By combining LaTeX with AI, "
257
+ "we create smart tools that help you build polished, accurate presentations quickly and smoothly. "
258
+ "Our goal is to make the process simple and stress-free, so you can spend more time on what really matters.</div>\n\n"
259
  )
260
+ with gr.Column(scale=1):
261
+ gr.HTML(f"""
262
+ <div style="display: flex; flex-direction: column; align-items: stretch;
263
+ gap: 8px; margin: 0; font-family: inherit;">
264
+ <p style="margin: 0 0 8px 0; padding: 0; font-size: 16px; font-family: inherit; text-align: center;">
265
+ Please ⭐️ us on GitHub!
266
+ </p>
267
+ <a href="https://github.com/RAGnTeX/RAGnTeX" target="_blank" style="
268
+ display: inline-flex;
269
+ align-items: center;
270
+ justify-content: center;
271
+ width: 100%;
272
+ padding: 12px;
273
+ background-color: #4c1d95;
274
+ color: white;
275
+ font-weight: 600;
276
+ font-family: inherit;
277
+ border-radius: 0;
278
+ text-decoration: none;
279
+ user-select: none;
280
+ cursor: pointer;
281
+ gap: 8px;
282
+ transition: background-color 0.2s ease-in-out;
283
+ "
284
+ onmouseover="this.style.backgroundColor='#6d28d9';"
285
+ onmouseout="this.style.backgroundColor='#4c1d95';"
286
+ >
287
+ <img src="{github_base64}" alt="GitHub" style="height: 20px; margin: 0;">
288
+ RAG'n'TeX
289
+ </a>
290
+ </div>
291
+ """)
292
 
293
+ with gr.Column(scale=1):
294
+ gr.Markdown(
295
+ "#### Authors:\n"
296
+ "- 👩🏻‍💻 **[Anna Ershova](https://github.com/AnnaErsh)**\n"
297
+ "- 👨🏼‍🔬 **[Kajetan Niewczas](https://github.com/KajetanNiewczas)**\n"
298
  )
299
+ gr.Markdown("📄 Licensed under the [MIT License](https://opensource.org/licenses/MIT)")
300
+
 
 
 
301
 
302
  upload_button.click(
303
  fn=upload_and_update_list,