WeijianQi1999 commited on
Commit
893ff6f
·
1 Parent(s): 99283d9
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -79,6 +79,14 @@ def nice_bounds(low: float, high: float) -> tuple[float, float]:
79
  low -= 1; high += 1
80
  return (np.floor(low / 10) * 10, np.ceil(high / 10) * 10)
81
 
 
 
 
 
 
 
 
 
82
  def plot_sr_vs_time(df: pd.DataFrame, title: str = "Success rate over time") -> go.Figure:
83
 
84
  work = df[df["Verified"] == True].copy() # filter out unverified rows
@@ -103,12 +111,13 @@ def plot_sr_vs_time(df: pd.DataFrame, title: str = "Success rate over time") ->
103
  ]
104
 
105
  for _, row in work.iterrows():
 
106
  fig.add_trace(
107
  go.Scatter(
108
  x=[row["Release Time"]],
109
  y=[row["Average SR"]],
110
  mode="markers+text",
111
- text=[row["Agent"]],
112
  textposition="top center",
113
  textfont=dict(size=11),
114
  marker=dict(size=10, color=color_map[row["Agent"]], opacity=0.9),
 
79
  low -= 1; high += 1
80
  return (np.floor(low / 10) * 10, np.ceil(high / 10) * 10)
81
 
82
+ def extract_agent_name(agent_str: str) -> str:
83
+ """Extract agent name from markdown link format [Name](url) or plain text"""
84
+ import re
85
+ match = re.match(r'\[([^\]]+)\]', agent_str)
86
+ if match:
87
+ return match.group(1)
88
+ return agent_str
89
+
90
  def plot_sr_vs_time(df: pd.DataFrame, title: str = "Success rate over time") -> go.Figure:
91
 
92
  work = df[df["Verified"] == True].copy() # filter out unverified rows
 
111
  ]
112
 
113
  for _, row in work.iterrows():
114
+ agent_display_name = extract_agent_name(row["Agent"])
115
  fig.add_trace(
116
  go.Scatter(
117
  x=[row["Release Time"]],
118
  y=[row["Average SR"]],
119
  mode="markers+text",
120
+ text=[agent_display_name],
121
  textposition="top center",
122
  textfont=dict(size=11),
123
  marker=dict(size=10, color=color_map[row["Agent"]], opacity=0.9),