mariagrandury commited on
Commit
168e052
1 Parent(s): 339a5a9

feature: get indicators from hf dataset

Browse files
Files changed (2) hide show
  1. app.py +3 -1
  2. requirements.txt +1 -0
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  import pandas as pd
 
3
 
4
  # Initialize total counts
5
  total_yes_count = 0
@@ -35,7 +36,8 @@ def calculate_overall_percentage():
35
 
36
 
37
  # Load data
38
- df = pd.read_csv("fmti-indicators.csv")
 
39
  grouped = df.groupby(["Domain", "Subdomain"])
40
 
41
  # Create an interface per group of indicators
 
1
  import gradio as gr
2
  import pandas as pd
3
+ from datasets import load_dataset
4
 
5
  # Initialize total counts
6
  total_yes_count = 0
 
36
 
37
 
38
  # Load data
39
+ dataset = load_dataset("mariagrandury/fmti-indicators")
40
+ df = pd.DataFrame(dataset["train"])
41
  grouped = df.groupby(["Domain", "Subdomain"])
42
 
43
  # Create an interface per group of indicators
requirements.txt CHANGED
@@ -1,3 +1,4 @@
 
1
  gradio==4.5.0
2
  pypdf2==3.0.1
3
  requests==2.31.0
 
1
+ datasets==2.15.0
2
  gradio==4.5.0
3
  pypdf2==3.0.1
4
  requests==2.31.0