Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -179,16 +179,6 @@ class AIEvaluationForm:
|
|
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"""
|
@@ -458,7 +448,15 @@ class AIEvaluationForm:
|
|
458 |
""")
|
459 |
|
460 |
return demo
|
461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
|
463 |
def main():
|
464 |
"""Main function to run the application"""
|
|
|
179 |
})
|
180 |
|
181 |
return sources
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
def generate_scorecard(self, *args) -> Tuple[Dict, str]:
|
184 |
"""Generate scorecard JSON from form inputs"""
|
|
|
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"""
|