Spaces:
GIZ
/
Running on CPU Upgrade

ppsingh commited on
Commit
a6131c7
·
1 Parent(s): 5aadbbb

text update in UI and readme

Browse files
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: EUDR Assistant
3
  emoji: 🧐
4
  colorFrom: yellow
5
  colorTo: gray
@@ -14,21 +14,21 @@ models:
14
  - BAAI/bge-reranker-v2-m3
15
  - meta-llama/Llama-3.1-8B-Instruct
16
  ---
17
- short_description: AI-powered conversational assistant for EU Deforestation Regulation compliance
18
  license: apache-2.0
19
 
20
 
21
  ## Technical Documentation of the system in accordance with EU AI Act
22
 
23
- **System Name:** EUDR ChatBot
24
 
25
  **Provider / Supplier:** GIZ Data Service Center
26
 
27
- **As of:** July 2025
28
 
29
  ## 1. General Description of the System
30
 
31
- EUDR Bot is an AI-powered conversational assistant designed to help you understand compliance with and analyze the EU Deforestation Regulation. This tool leverages advanced language models to help you get clear and structured answers about EUDR requirements, compliance procedures, and regulatory guidance.
32
 
33
  It combines a generative language assistant with a knowledge base implemented via Retrieval-Augmented Generation (RAG). The scope and functionality of the tool is focused on EU Deforestation Regulation compliance and related documentation.
34
 
@@ -48,11 +48,11 @@ It combines a generative language assistant with a knowledge base implemented vi
48
 
49
  ## 3. Model Training Data
50
 
51
- All the models mentioned above are being consumed without any fine-tuning or training being performed by the developer team of EUDR Bot. And hence there is no training data which had been used by the development team of EUDR Bot.
52
 
53
  ## 4. Knowledge Base (Retrieval Component)
54
 
55
- - **Data Sources:** Public EUDR documentation, regulatory guidance, and compliance materials
56
  - **Embedding Model:** [BAAI/bge-m3](https://huggingface.co/BAAI/bge-m3)
57
  - **Embedding Dimension:** 1024
58
  - **Vector Database:** Qdrant (via API)
@@ -71,14 +71,14 @@ All the models mentioned above are being consumed without any fine-tuning or tra
71
  - The user interface clearly indicates the use of a generative AI model.
72
  - An explanation of the RAG method is included.
73
  - We collect usage statistics as detailed in Disclaimer tab of the app along with the explicit display in the user interface of the tool.
74
- - Feedback mechanism available (via https://huggingface.co/spaces/GIZ/eudr_assistant/discussions/new).
75
 
76
  ## 7. Monitoring, Feedback, and Incident Reporting
77
 
78
- - User can provide feedback via UI by giving (Thumbs-up or down to AI-Generated answer). Alternatively for more detailed feedback please use https://huggingface.co/spaces/GIZ/eudr_assistant/discussions/new to report any issue.
79
  - Technical development is carried out by the GIZ Data Service Center.
80
  - No automated bias detection – but low risk due to content restrictions.
81
 
82
  ## 8. Contact
83
 
84
- For any questions, please contact via https://huggingface.co/spaces/GIZ/eudr_assistant/discussions/new or send us email to [email protected]
 
1
  ---
2
+ title: Gina Assistant
3
  emoji: 🧐
4
  colorFrom: yellow
5
  colorTo: gray
 
14
  - BAAI/bge-reranker-v2-m3
15
  - meta-llama/Llama-3.1-8B-Instruct
16
  ---
17
+ short_description: AI-powered conversational assistant for Circular Economy
18
  license: apache-2.0
19
 
20
 
21
  ## Technical Documentation of the system in accordance with EU AI Act
22
 
23
+ **System Name:** Gina ChatBot
24
 
25
  **Provider / Supplier:** GIZ Data Service Center
26
 
27
+ **As of:** August 2025
28
 
29
  ## 1. General Description of the System
30
 
31
+ Gina Bot is an AI-powered conversational assistant designed to help you understand compliance with and analyze the Circular Economy topic. This tool leverages advanced language models to help you get clear and structured answers about Circular Economy requirements, compliance procedures, and regulatory guidance.
32
 
33
  It combines a generative language assistant with a knowledge base implemented via Retrieval-Augmented Generation (RAG). The scope and functionality of the tool is focused on EU Deforestation Regulation compliance and related documentation.
34
 
 
48
 
49
  ## 3. Model Training Data
50
 
51
+ All the models mentioned above are being consumed without any fine-tuning or training being performed by the developer team of Gina Bot. And hence there is no training data which had been used by the development team of Gina Bot.
52
 
53
  ## 4. Knowledge Base (Retrieval Component)
54
 
55
+ - **Data Sources:** Public Circular Economy documentation, regulatory guidance, and compliance materials
56
  - **Embedding Model:** [BAAI/bge-m3](https://huggingface.co/BAAI/bge-m3)
57
  - **Embedding Dimension:** 1024
58
  - **Vector Database:** Qdrant (via API)
 
71
  - The user interface clearly indicates the use of a generative AI model.
72
  - An explanation of the RAG method is included.
73
  - We collect usage statistics as detailed in Disclaimer tab of the app along with the explicit display in the user interface of the tool.
74
+ - Feedback mechanism available (via https://huggingface.co/spaces/GIZ/gina_dev/discussions/new).
75
 
76
  ## 7. Monitoring, Feedback, and Incident Reporting
77
 
78
+ - User can provide feedback via UI by giving (Thumbs-up or down to AI-Generated answer). Alternatively for more detailed feedback please use https://huggingface.co/spaces/GIZ/gina_dev/discussions/new to report any issue.
79
  - Technical development is carried out by the GIZ Data Service Center.
80
  - No automated bias detection – but low risk due to content restrictions.
81
 
82
  ## 8. Contact
83
 
84
+ For any questions, please contact via https://huggingface.co/spaces/GIZ/gina_dev/discussions/new or send us email to [email protected]
app.py CHANGED
@@ -9,21 +9,15 @@ from utils.generator import generate
9
 
10
  # Sample questions for examples
11
  SAMPLE_QUESTIONS = {
12
- "Análisis de la deforestación": [
13
- "¿Cuáles son los principales puntos críticos de deforestación en Ecuador?",
14
- "Muéstrame las tendencias de deforestación en el área cargada.",
15
- "¿Qué productos básicos están impulsando la deforestación en Guatemala?"
16
  ],
17
- "Cumplimiento de la EUDR": [
18
- "¿Cuáles son los requisitos clave del EUDR para las importaciones de café?",
19
- "¿Cómo puedo demostrar que he actuado con la debida diligencia en mi cadena de suministro?",
20
- "¿Qué documentación se necesita para cumplir con la EUDR?"
21
- ],
22
- "Evaluación de riesgos": [
23
- "¿Cuál es el nivel de riesgo de deforestación en esta región?",
24
- "¿Cómo evalúo los riesgos de la cadena de suministro?",
25
- "¿Cuáles son los plazos de cumplimiento?"
26
- ]
27
  }
28
 
29
  # Global variable to cache API results and prevent double calls
@@ -193,25 +187,19 @@ custom_css = """
193
  """
194
 
195
  init_prompt = """
196
- Hola, soy EUDR Bot, un asistente conversacional basado en inteligencia artificial diseñado
197
- para ayudarle a comprender el cumplimiento y el análisis del Reglamento de la UE sobre
198
- la deforestación. Responderé a sus preguntas utilizando los informes EUDR y los archivos
199
- GeoJSON cargados.
200
-
201
- 💡 **Cómo utilizarlo (pestañas a la derecha)**
202
-
203
- **Fuentes de datos:** elige entre subir un archivo GeoJSON para su análisis o consultar los informes EUDR filtrados por país.
204
- **Ejemplos:** selecciona entre preguntas de ejemplo seleccionadas de diferentes categorías.
205
- **Fuentes:** consulta las fuentes de contenido utilizadas para generar respuestas para la verificación de datos.
206
-
207
- ⚠️ Para conocer las limitaciones y la información sobre la recopilación de datos, consulta la pestaña «Aviso legal».
208
 
 
 
 
 
209
  """
210
 
211
- with gr.Blocks(title="EUDR Bot", theme=theme, css=custom_css) as demo:
212
 
213
  # Main Chat Interface
214
- with gr.Tab("EUDR Bot"):
215
  with gr.Row():
216
  # Left column - Chat interface (2/3 width)
217
  with gr.Column(scale=2):
@@ -236,7 +224,7 @@ with gr.Blocks(title="EUDR Bot", theme=theme, css=custom_css) as demo:
236
  # Input textbox
237
  with gr.Row():
238
  textbox = gr.Textbox(
239
- placeholder="¡Pregúntame cualquier cosa sobre el cumplimiento de la normativa EUDR o sube tu GeoJSON para su análisis!",
240
  show_label=False,
241
  scale=7,
242
  lines=1,
@@ -319,22 +307,21 @@ with gr.Blocks(title="EUDR Bot", theme=theme, css=custom_css) as demo:
319
  # Guidelines Tab
320
  with gr.Tab("Directrices"):
321
  gr.Markdown("""
322
- #### Welcome to EUDR Q&A!
323
 
324
- This AI-powered assistant helps you understand EU Deforestation Regulation compliance and analyze geographic data.
325
 
326
  ## 💬 How to Ask Effective Questions
327
 
328
  | ❌ Less Effective | ✅ More Effective |
329
  |------------------|-------------------|
330
- | "What is deforestation?" | "What are the main deforestation hotspots in Ecuador?" |
331
- | "Tell me about compliance" | "What EUDR requirements apply to coffee imports from Guatemala?" |
332
- | "Show me data" | "What is the deforestation rate in the uploaded region?" |
333
 
334
  ## 🔍 Using Data Sources
335
 
336
- **Upload GeoJSON:** Upload your geographic data files for automatic analysis via WHISP API
337
- **Talk to Reports:** Select Ecuador or Guatemala for country-specific EUDR analysis
338
 
339
  ## ⭐ Best Practices
340
 
@@ -347,23 +334,20 @@ with gr.Blocks(title="EUDR Bot", theme=theme, css=custom_css) as demo:
347
  # About Tab
348
  with gr.Tab("Información"):
349
  gr.Markdown("""
350
- ## About EUDR Q&A
351
 
352
- The **EU Deforestation Regulation (EUDR)** requires companies to ensure that specific commodities
353
- placed on the EU market are deforestation-free and legally produced.
354
 
355
  This AI-powered tool helps stakeholders:
356
- - Understand EUDR compliance requirements
357
- - Analyze geographic deforestation data using WHISP API
358
- - Assess supply chain risks
359
  - Navigate complex regulatory landscapes
360
 
361
- **Developed by GIZ** to enhance accessibility and understanding of EUDR requirements
362
  through advanced AI and geographic data processing capabilities.
363
 
364
  ### Key Features:
365
- - Automatic analysis of uploaded GeoJSON files via WHISP API
366
- - Country-specific EUDR compliance guidance
367
  - Real-time question answering with source citations
368
  - User-friendly interface for complex regulatory information
369
  """)
@@ -374,12 +358,11 @@ with gr.Blocks(title="EUDR Bot", theme=theme, css=custom_css) as demo:
374
  ## Important Disclaimers
375
 
376
  ⚠️ **Scope & Limitations:**
377
- - This tool is designed for EUDR compliance assistance and geographic data analysis
378
  - Responses should not be considered official legal or compliance advice
379
  - Always consult qualified professionals for official compliance decisions
380
 
381
  ⚠️ **Data & Privacy:**
382
- - Uploaded GeoJSON files are processed via external WHISP API for analysis
383
  - We collect usage statistics to improve the tool
384
  - Files are processed temporarily and not permanently stored
385
 
 
9
 
10
  # Sample questions for examples
11
  SAMPLE_QUESTIONS = {
12
+ "Fundamentos y tendencias internacionales de EC": [
13
+ "¿Cómo se diferencia el modelo de economía circular del modelo lineal tradicional de 'tomar, hacer, desechar'?",
14
+ "¿Cuáles son algunos de los principios clave de la economía circular y cómo se aplican en la práctica?",
15
+ "¿Podrías dar ejemplos de industrias o empresas que estén implementando con éxito prácticas de economía circular?"
16
  ],
17
+ "EC en Colombia": [
18
+ "¿Qué políticas y normativas vigentes en Colombia impulsan la adopción de la economía circular?",
19
+ "¿Cómo pueden las regulaciones colombianas incentivar la innovación en el ecodiseño y la gestión de residuos?",
20
+ "¿Qué papel tienen los instrumentos económicos y fiscales en la promoción de la circularidad en el sector productivo de Colombia?"]
 
 
 
 
 
 
21
  }
22
 
23
  # Global variable to cache API results and prevent double calls
 
187
  """
188
 
189
  init_prompt = """
190
+ Hola, soy Gina, una asistente conversacional con IA diseñada para ayudarte a comprender conceptos y ayudarte con el tema de la Economía Circular. Responderé a tus preguntas usando la base de datos de documentos sobre economía circular.
191
+ 💡 **Cómo usarla (pestañas a la derecha)**
 
 
 
 
 
 
 
 
 
 
192
 
193
+ **Fuentes de datos:** Selecciona la sección de informes/documentos.
194
+ **Ejemplos:** Selecciona entre ejemplos de preguntas de diferentes categorías.
195
+ **Fuentes:** Consulta las fuentes de contenido utilizadas para generar las respuestas para la verificación de datos.
196
+ ⚠️ Para conocer las limitaciones e información sobre la recopilación de datos, consulta la pestaña "Aviso legal"
197
  """
198
 
199
+ with gr.Blocks(title="Gina Bot", theme=theme, css=custom_css) as demo:
200
 
201
  # Main Chat Interface
202
+ with gr.Tab("Gina Bot"):
203
  with gr.Row():
204
  # Left column - Chat interface (2/3 width)
205
  with gr.Column(scale=2):
 
224
  # Input textbox
225
  with gr.Row():
226
  textbox = gr.Textbox(
227
+ placeholder="Pregúntame cualquier cosa sobre Economía Circular",
228
  show_label=False,
229
  scale=7,
230
  lines=1,
 
307
  # Guidelines Tab
308
  with gr.Tab("Directrices"):
309
  gr.Markdown("""
310
+ #### Welcome to Gina Q&A!
311
 
312
+ This AI-powered assistant helps you understand Circular Economy.
313
 
314
  ## 💬 How to Ask Effective Questions
315
 
316
  | ❌ Less Effective | ✅ More Effective |
317
  |------------------|-------------------|
318
+ | "What is economy?" | "What are impact of circular economy on businesses?" |
319
+ | "Tell me about compliance" | "What are country guidelines on circular economy" |
320
+ | "Show me data" | "What is the trend on waste and how circular economy is helping in resolving this?" |
321
 
322
  ## 🔍 Using Data Sources
323
 
324
+ **Talk to Reports:** Select reports sections "Trend and fundamentals", "Financing Mechanisms", "Country Resource"
 
325
 
326
  ## ⭐ Best Practices
327
 
 
334
  # About Tab
335
  with gr.Tab("Información"):
336
  gr.Markdown("""
337
+ ## About Gina Q&A
338
 
339
+ The **Circular Economy** places some obligations on the manufacturers and business.
 
340
 
341
  This AI-powered tool helps stakeholders:
342
+ - Understand circular Economy concepts and regulations
343
+ - Assess supply chain issues
 
344
  - Navigate complex regulatory landscapes
345
 
346
+ **Developed by GIZ** for project in Colombia to enhance accessibility and understanding of circular Economy requirements
347
  through advanced AI and geographic data processing capabilities.
348
 
349
  ### Key Features:
350
+ - Country-specific compliance guidance
 
351
  - Real-time question answering with source citations
352
  - User-friendly interface for complex regulatory information
353
  """)
 
358
  ## Important Disclaimers
359
 
360
  ⚠️ **Scope & Limitations:**
361
+ - This tool is designed for Circular Economy assistance and geographic data analysis
362
  - Responses should not be considered official legal or compliance advice
363
  - Always consult qualified professionals for official compliance decisions
364
 
365
  ⚠️ **Data & Privacy:**
 
366
  - We collect usage statistics to improve the tool
367
  - Files are processed temporarily and not permanently stored
368
 
utils/__pycache__/generator.cpython-310.pyc CHANGED
Binary files a/utils/__pycache__/generator.cpython-310.pyc and b/utils/__pycache__/generator.cpython-310.pyc differ
 
utils/__pycache__/retriever.cpython-310.pyc CHANGED
Binary files a/utils/__pycache__/retriever.cpython-310.pyc and b/utils/__pycache__/retriever.cpython-310.pyc differ