mpekpe commited on
Commit
315d628
·
verified ·
1 Parent(s): d620d8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -19
app.py CHANGED
@@ -136,27 +136,17 @@ a:hover {
136
 
137
  explanation = """
138
  <div style="background-color: #44475a; padding: 15px; border-radius: 5px; margin-bottom: 20px; color: #f8f8f2;">
139
- <h3 style="color: #50fa7b;">About Multimodal RAG</h3>
140
- <p>Multimodal RAG (Retrieval-Augmented Generation) combines text and image processing to provide more context-aware responses. This demo uses:</p>
141
- <ul>
142
- <li><strong style="color: #ffb86c;">ColPali</strong>: A multimodal retriever for efficient information retrieval from images and text.</li>
143
- <li><strong style="color: #ffb86c;">Byaldi</strong>: A new library by answer.ai that simplifies the use of ColPali.</li>
144
- <li><strong style="color: #ffb86c;">Qwen/Qwen2-VL-2B-Instruct</strong>: A large language model capable of processing both text and visual inputs.</li>
145
- </ul>
146
- <p>This combination allows for more accurate and context-aware responses to queries about uploaded PDFs.</p>
147
  </div>
148
  """
149
 
150
  footer = """
151
  <div style="text-align: center; margin-top: 20px; color: #f8f8f2;">
152
- <a href="https://www.linkedin.com/in/pejman-ebrahimi-4a60151a7/" target="_blank">LinkedIn</a> |
153
- <a href="https://github.com/arad1367" target="_blank">GitHub</a> |
154
- <a href="https://arad1367.pythonanywhere.com/" target="_blank">Live demo of my PhD defense</a> |
155
- <a href="https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct" target="_blank">Qwen/Qwen2-VL-2B-Instruct</a> |
156
- <a href="https://github.com/AnswerDotAI/byaldi" target="_blank">Byaldi</a> |
157
- <a href="https://github.com/illuin-tech/colpali" target="_blank">ColPali</a>
158
  <br>
159
- Made with 💖 by Pejman Ebrahimi
160
  </div>
161
  """
162
 
@@ -164,14 +154,13 @@ with gr.Blocks(css=css, theme='freddyaboulton/dracula_revamped') as demo:
164
  gr.HTML('<h1 style="text-align: center; font-size: 32px;"><a href="https://github.com/arad1367" target="_blank" style="text-decoration: none; color: #50fa7b;">Multimodal RAG with Image Query - By Pejman Ebrahimi (Please Like the Space)</a></h1>')
165
  gr.HTML(explanation)
166
  pdf_input = gr.File(label="Upload PDF")
167
- query_input = gr.Textbox(label="Enter your query", placeholder="Ask a question about the PDF")
168
  submit_btn = gr.Button("Submit", elem_classes="submit-btn")
169
- output_text = gr.Textbox(label="Model Answer")
170
- output_images = gr.Textbox(label="Number of Images in PDF")
171
 
172
  submit_btn.click(process_pdf_and_query, inputs=[pdf_input, query_input], outputs=[output_text, output_images])
173
 
174
- gr.DuplicateButton(value="Duplicate Space for private use", elem_classes="duplicate-button")
175
  gr.HTML(footer)
176
 
177
  demo.launch(debug=True)
 
136
 
137
  explanation = """
138
  <div style="background-color: #44475a; padding: 15px; border-radius: 5px; margin-bottom: 20px; color: #f8f8f2;">
139
+ <h3 style="color: #50fa7b;"> MICA </h3>
140
+ <p>
141
+ MICA est une intelligene artificielle dédiée à la comptabilité associative, offrant analyse automatisée, recommandations personnalisées et conformité RGPD. Il simplifie la gestion comptable, optimise les décisions et détecte les anomalies. MICA complète l’expertise humaine pour un gain de temps et de précision, tout en respectant les spécificités du secteur associatif.
142
+ </p>
 
 
 
 
143
  </div>
144
  """
145
 
146
  footer = """
147
  <div style="text-align: center; margin-top: 20px; color: #f8f8f2;">
148
+ <a href="https://www.inediia.com/" target="_blank">Inediia</a> |
 
 
 
 
 
149
  <br>
 
150
  </div>
151
  """
152
 
 
154
  gr.HTML('<h1 style="text-align: center; font-size: 32px;"><a href="https://github.com/arad1367" target="_blank" style="text-decoration: none; color: #50fa7b;">Multimodal RAG with Image Query - By Pejman Ebrahimi (Please Like the Space)</a></h1>')
155
  gr.HTML(explanation)
156
  pdf_input = gr.File(label="Upload PDF")
157
+ query_input = gr.Textbox(label="Poser votre question", placeholder="Poser votre question sur la comptabilité des associations")
158
  submit_btn = gr.Button("Submit", elem_classes="submit-btn")
159
+ output_text = gr.Textbox(label="Réponse de MICA")
160
+ output_images = gr.Textbox(label="Nombre de pages pdf")
161
 
162
  submit_btn.click(process_pdf_and_query, inputs=[pdf_input, query_input], outputs=[output_text, output_images])
163
 
 
164
  gr.HTML(footer)
165
 
166
  demo.launch(debug=True)