Update app.py
Browse files
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;">
|
140 |
-
<p>
|
141 |
-
|
142 |
-
|
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.
|
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="
|
168 |
submit_btn = gr.Button("Submit", elem_classes="submit-btn")
|
169 |
-
output_text = gr.Textbox(label="
|
170 |
-
output_images = gr.Textbox(label="
|
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)
|