Spaces:
Sleeping
Sleeping
John Graham Reynolds
commited on
Commit
·
3a45cce
1
Parent(s):
7f4b374
see if error comes from compute
Browse files
app.py
CHANGED
@@ -19,22 +19,25 @@ local_path = Path(sys.path[0])
|
|
19 |
test_cases = [ {"predictions":[1,2,3,4,5], "references":[1,2,5,4,3]} ] # configure this randomly using randint generator and feature names?
|
20 |
|
21 |
# configure this based on the input type, etc. for launch_gradio_widget
|
22 |
-
def compute(input_df: pd.DataFrame, feature_names: tuple[str]):
|
23 |
|
24 |
-
|
25 |
-
|
26 |
|
27 |
-
|
28 |
|
29 |
-
|
30 |
|
31 |
-
|
|
|
|
|
|
|
32 |
|
33 |
space = gr.Interface(
|
34 |
fn=compute,
|
35 |
inputs=[
|
36 |
gr.Dataframe(
|
37 |
-
headers=
|
38 |
col_count=len(feature_names),
|
39 |
row_count=5,
|
40 |
datatype=json_to_string_type(gradio_input_types),
|
|
|
19 |
test_cases = [ {"predictions":[1,2,3,4,5], "references":[1,2,5,4,3]} ] # configure this randomly using randint generator and feature names?
|
20 |
|
21 |
# configure this based on the input type, etc. for launch_gradio_widget
|
22 |
+
# def compute(input_df: pd.DataFrame, feature_names: tuple[str]):
|
23 |
|
24 |
+
# predicted = [int(num) for num in input_df[feature_names[0]].to_list()]
|
25 |
+
# references = [int(num) for num in input_df[feature_names[1]].to_list()]
|
26 |
|
27 |
+
# metric.add_batch(predictions=predicted, references=references)
|
28 |
|
29 |
+
# outputs = metric._compute()
|
30 |
|
31 |
+
# f"Your metrics are as follows: \n {outputs}"
|
32 |
+
|
33 |
+
def compute():
|
34 |
+
pass
|
35 |
|
36 |
space = gr.Interface(
|
37 |
fn=compute,
|
38 |
inputs=[
|
39 |
gr.Dataframe(
|
40 |
+
headers=feature_names,
|
41 |
col_count=len(feature_names),
|
42 |
row_count=5,
|
43 |
datatype=json_to_string_type(gradio_input_types),
|