Commit
·
ca59093
1
Parent(s):
7ce5aba
update
Browse files
app.py
CHANGED
@@ -1,16 +1,46 @@
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
import numpy as np
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
# Clean up the data
|
9 |
df = df.dropna() # Remove any rows with missing values
|
10 |
df.columns = df.columns.str.strip() # Remove any whitespace from column names
|
11 |
|
12 |
# Rename columns to match our expected format
|
13 |
-
df = df.rename(columns={
|
|
|
|
|
|
|
14 |
|
15 |
# Create size display format
|
16 |
df["Size_Display"] = df["Size"].apply(
|
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
import numpy as np
|
4 |
+
import requests
|
5 |
+
from io import StringIO
|
6 |
+
import os
|
7 |
+
|
8 |
+
dropbox_url = os.getenv("FACTS_RES_URL")
|
9 |
+
|
10 |
+
try:
|
11 |
+
# Download the TSV file
|
12 |
+
response = requests.get(dropbox_url)
|
13 |
+
response.raise_for_status() # Raise an exception for bad status codes
|
14 |
+
|
15 |
+
# Read the TSV data
|
16 |
+
df = pd.read_csv(StringIO(response.text), sep='\t')
|
17 |
+
print(f"Successfully loaded {len(df)} models from Dropbox")
|
18 |
+
except Exception as e:
|
19 |
+
print(f"Error loading data from Dropbox: {e}")
|
20 |
+
# Show sample data when download fails
|
21 |
+
df = pd.DataFrame({
|
22 |
+
'model': [
|
23 |
+
'deepseek-ai/DeepSeek-R1-Distill-Qwen-14B',
|
24 |
+
'meta-llama/Llama-3.3-70B-Instruct',
|
25 |
+
'Qwen/Qwen3-30B-A3B',
|
26 |
+
'google/gemma-3-27b-it'
|
27 |
+
],
|
28 |
+
'size': [14, 70, 30, 27],
|
29 |
+
'Separate Grounding Score': [0.817797, 0.842553, 0.812766, 0.936],
|
30 |
+
'Separate Quality Score': [0.542373, 0.510638, 0.540426, 0.391],
|
31 |
+
'Combined Score': [0.457627, 0.425532, 0.425532, 0.378]
|
32 |
+
})
|
33 |
+
print("Showing sample data (download failed)")
|
34 |
|
35 |
# Clean up the data
|
36 |
df = df.dropna() # Remove any rows with missing values
|
37 |
df.columns = df.columns.str.strip() # Remove any whitespace from column names
|
38 |
|
39 |
# Rename columns to match our expected format
|
40 |
+
df = df.rename(columns={
|
41 |
+
'model': 'Model Name',
|
42 |
+
'size': 'Size'
|
43 |
+
})
|
44 |
|
45 |
# Create size display format
|
46 |
df["Size_Display"] = df["Size"].apply(
|