Spaces:
Running
Running
huangshiyu
commited on
Commit
·
1288c9d
1
Parent(s):
c571a53
update
Browse files- app.py +1 -1
- compute_accuracy.py +2 -2
app.py
CHANGED
|
@@ -207,7 +207,7 @@ with block:
|
|
| 207 |
label="Model name", placeholder="CogVLM2-Video"
|
| 208 |
)
|
| 209 |
revision_name_textbox = gr.Textbox(
|
| 210 |
-
label="Revision Model Name", placeholder="
|
| 211 |
)
|
| 212 |
|
| 213 |
with gr.Column():
|
|
|
|
| 207 |
label="Model name", placeholder="CogVLM2-Video"
|
| 208 |
)
|
| 209 |
revision_name_textbox = gr.Textbox(
|
| 210 |
+
label="Revision Model Name", placeholder=""
|
| 211 |
)
|
| 212 |
|
| 213 |
with gr.Column():
|
compute_accuracy.py
CHANGED
|
@@ -3,7 +3,7 @@ import jsonlines
|
|
| 3 |
from collections import defaultdict
|
| 4 |
|
| 5 |
|
| 6 |
-
def compute_accuracy(
|
| 7 |
total_qa_num = 0
|
| 8 |
total_answered_num = 0
|
| 9 |
right_num = 0
|
|
@@ -12,7 +12,7 @@ def compute_accuracy(model_answers: dict, video_meta_file: str):
|
|
| 12 |
category_total = defaultdict(float)
|
| 13 |
category_acc = defaultdict(float)
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
with jsonlines.open(video_meta_file) as reader:
|
| 18 |
video_meta = list(reader)
|
|
|
|
| 3 |
from collections import defaultdict
|
| 4 |
|
| 5 |
|
| 6 |
+
def compute_accuracy(input_file: bytes, video_meta_file: str):
|
| 7 |
total_qa_num = 0
|
| 8 |
total_answered_num = 0
|
| 9 |
right_num = 0
|
|
|
|
| 12 |
category_total = defaultdict(float)
|
| 13 |
category_acc = defaultdict(float)
|
| 14 |
|
| 15 |
+
model_answers = json.loads(input_file)
|
| 16 |
|
| 17 |
with jsonlines.open(video_meta_file) as reader:
|
| 18 |
video_meta = list(reader)
|