Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -153,7 +153,7 @@ def fetch_merge_configs(df):
|
|
153 |
df_sorted = df.sort_values(by='Average', ascending=False)
|
154 |
|
155 |
# Open the file in append mode
|
156 |
-
with open('configurations.txt', 'a') as file:
|
157 |
# Get model cards for the top 20 entries
|
158 |
for index, row in df_sorted.head(20).iterrows():
|
159 |
model_name = row['Model'].rstrip()
|
@@ -167,7 +167,7 @@ def fetch_merge_configs(df):
|
|
167 |
file.write(f'Model Card: {card}\n')
|
168 |
|
169 |
# Open the second file in read mode
|
170 |
-
with open('configurations.txt', 'r') as file:
|
171 |
# Read the content
|
172 |
content = file.read()
|
173 |
|
@@ -175,7 +175,7 @@ def fetch_merge_configs(df):
|
|
175 |
matches = re.findall(r'yaml(.*?)```', content, re.DOTALL)
|
176 |
|
177 |
# Open the file 'configurations2.txt' in write mode
|
178 |
-
with open('configurations2.txt', 'w') as file:
|
179 |
# Write the matches to the file
|
180 |
for row, match in zip(df_sorted[['Model', 'Average', 'AGIEval', 'GPT4All', 'TruthfulQA', 'Bigbench']].head(20).values, matches):
|
181 |
file.write(f'Model Name: {row[0]}\n')
|
@@ -371,7 +371,7 @@ def main():
|
|
371 |
df_sorted = df.sort_values(by='Average', ascending=False)
|
372 |
|
373 |
# Open the file in append mode
|
374 |
-
with open('configurations.txt', 'a') as file:
|
375 |
# Get model cards for the top 20 entries
|
376 |
for index, row in df_sorted.head(20).iterrows():
|
377 |
model_name = row['Model'].rstrip()
|
|
|
153 |
df_sorted = df.sort_values(by='Average', ascending=False)
|
154 |
|
155 |
# Open the file in append mode
|
156 |
+
with open('/tmp/configurations.txt', 'a') as file:
|
157 |
# Get model cards for the top 20 entries
|
158 |
for index, row in df_sorted.head(20).iterrows():
|
159 |
model_name = row['Model'].rstrip()
|
|
|
167 |
file.write(f'Model Card: {card}\n')
|
168 |
|
169 |
# Open the second file in read mode
|
170 |
+
with open('/tmp/configurations.txt', 'r') as file:
|
171 |
# Read the content
|
172 |
content = file.read()
|
173 |
|
|
|
175 |
matches = re.findall(r'yaml(.*?)```', content, re.DOTALL)
|
176 |
|
177 |
# Open the file 'configurations2.txt' in write mode
|
178 |
+
with open('/tmp/configurations2.txt', 'w') as file:
|
179 |
# Write the matches to the file
|
180 |
for row, match in zip(df_sorted[['Model', 'Average', 'AGIEval', 'GPT4All', 'TruthfulQA', 'Bigbench']].head(20).values, matches):
|
181 |
file.write(f'Model Name: {row[0]}\n')
|
|
|
371 |
df_sorted = df.sort_values(by='Average', ascending=False)
|
372 |
|
373 |
# Open the file in append mode
|
374 |
+
with open('/tmp/configurations.txt', 'a') as file:
|
375 |
# Get model cards for the top 20 entries
|
376 |
for index, row in df_sorted.head(20).iterrows():
|
377 |
model_name = row['Model'].rstrip()
|