kz-transformers commited on
Commit
8303012
·
verified ·
1 Parent(s): 0a4d80c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -25,13 +25,24 @@ def submit_file(v, file_path, mn, profile: gr.OAuthProfile | None):
25
  if profile is None:
26
  return "Hub Login Required"
27
  print('PROFILE: ', profile.__dict__)
 
28
  new_file = v['results']
29
- new_file['model'] = profile.username + "/" + mn
30
- new_file['kazakhdasturmc'] = new_file['kazakhdasturmc']['acc,none']
 
 
 
 
 
 
 
 
 
 
 
31
  new_file['model_dtype'] = v['config']["model_dtype"]
32
  new_file['ppl'] = 0
33
- # new_file.pop('moviemc')
34
- # new_file.pop('bookmc')
35
  print('WE READ FILE: ', new_file)
36
  buf = BytesIO()
37
  buf.write(json.dumps(new_file).encode('utf-8'))
 
25
  if profile is None:
26
  return "Hub Login Required"
27
  print('PROFILE: ', profile.__dict__)
28
+
29
  new_file = v['results']
30
+ if profile.username == 'kz-transformers':
31
+ new_file['model'] = mn
32
+ else:
33
+ new_file['model'] = profile.username + "/" + mn
34
+ columns = [
35
+ 'kazakh_mmlu_translated_kk', 'kazakh_constitution_mc', 'kazakh_dastur_mc', 'kazakh_and_literature_unt_mc', 'kazakh_geography_unt_mc',
36
+ 'kazakh_world_history_unt_mc', 'kazakh_history_of_kazakhstan_unt_mc', 'kazakh_english_unt_mc', 'kazakh_biology_unt_mc',
37
+ 'kazakh_human_society_rights_unt_mc'
38
+ ]
39
+
40
+ for column in columns:
41
+ new_file[column] = new_file[column]['acc,none']
42
+
43
  new_file['model_dtype'] = v['config']["model_dtype"]
44
  new_file['ppl'] = 0
45
+
 
46
  print('WE READ FILE: ', new_file)
47
  buf = BytesIO()
48
  buf.write(json.dumps(new_file).encode('utf-8'))