felfri commited on
Commit
f1df46f
·
verified ·
1 Parent(s): 0a902e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -12
app.py CHANGED
@@ -179,7 +179,17 @@ class AIEvaluationForm:
179
  })
180
 
181
  return sources
182
-
 
 
 
 
 
 
 
 
 
 
183
  def generate_scorecard(self, *args) -> Tuple[Dict, str]:
184
  """Generate scorecard JSON from form inputs"""
185
  # Debug: Print argument types and counts
@@ -416,8 +426,8 @@ class AIEvaluationForm:
416
  "BigCode", # provider
417
  "https://huggingface.co/bigcode/starcoder2-15b", # url
418
  "Generative Model", # type
419
- ["Text"] # input modalities
420
- ["Text"] # output modalities
421
  ]
422
  # Add default values for evaluation sections (all N/A initially)
423
  remaining_defaults = []
@@ -448,15 +458,7 @@ class AIEvaluationForm:
448
  """)
449
 
450
  return demo
451
-
452
- def load_uploaded_json(file):
453
- if file is None:
454
- return {}
455
- try:
456
- with open(file.name, 'r') as f:
457
- return json.load(f)
458
- except Exception as e:
459
- return {"error": str(e)}
460
 
461
  def main():
462
  """Main function to run the application"""
 
179
  })
180
 
181
  return sources
182
+
183
+ def load_uploaded_json(file):
184
+ if file is None:
185
+ return {}
186
+ try:
187
+ with open(file.name, 'r') as f:
188
+ return json.load(f)
189
+ except Exception as e:
190
+ return {"error": str(e)}
191
+
192
+
193
  def generate_scorecard(self, *args) -> Tuple[Dict, str]:
194
  """Generate scorecard JSON from form inputs"""
195
  # Debug: Print argument types and counts
 
426
  "BigCode", # provider
427
  "https://huggingface.co/bigcode/starcoder2-15b", # url
428
  "Generative Model", # type
429
+ ["Text"], # input modalities
430
+ ["Text"], # output modalities
431
  ]
432
  # Add default values for evaluation sections (all N/A initially)
433
  remaining_defaults = []
 
458
  """)
459
 
460
  return demo
461
+
 
 
 
 
 
 
 
 
462
 
463
  def main():
464
  """Main function to run the application"""