dvilasuero HF staff commited on
Commit
1a9d613
β€’
1 Parent(s): 190750f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -67,9 +67,8 @@ def get_user_annotations_dictionary(
67
  def donut_chart() -> alt.Chart:
68
  # Load your data
69
  source_dataset, results = obtain_source_target_datasets()
70
- pending_records = len(source_dataset)
71
  annotated_records = len(results)
72
- print(annotated_records)
73
 
74
  # Prepare data for the donut chart
75
  source = pd.DataFrame({
@@ -102,8 +101,7 @@ def kpi_chart_remaining() -> alt.Chart:
102
  """
103
 
104
  source_dataset, results = obtain_source_target_datasets()
105
- pending_records = len(source_dataset)
106
-
107
  # Assuming you have a DataFrame with user data, create a sample DataFrame
108
  data = pd.DataFrame({"Category": ["Total remaining"], "Value": [pending_records]})
109
 
 
67
  def donut_chart() -> alt.Chart:
68
  # Load your data
69
  source_dataset, results = obtain_source_target_datasets()
 
70
  annotated_records = len(results)
71
+ pending_records = int(os.getenv("TARGET_RECORDS")) - annotated_records
72
 
73
  # Prepare data for the donut chart
74
  source = pd.DataFrame({
 
101
  """
102
 
103
  source_dataset, results = obtain_source_target_datasets()
104
+ pending_records = int(os.getenv("TARGET_RECORDS")) - len(results)
 
105
  # Assuming you have a DataFrame with user data, create a sample DataFrame
106
  data = pd.DataFrame({"Category": ["Total remaining"], "Value": [pending_records]})
107