vazish commited on
Commit
cce5dde
·
unverified ·
1 Parent(s): de12cd1

update latency

Browse files
Files changed (1) hide show
  1. app.py +4 -11
app.py CHANGED
@@ -122,19 +122,12 @@ with tab_try:
122
  )
123
 
124
  if user_query.strip():
125
- t0 = time.perf_counter()
126
  result = norm.normalize(user_query.strip())
127
- elapsed_ms = (time.perf_counter() - t0) * 1000
128
 
129
- res_col, meta_col = st.columns([3, 1])
130
- with res_col:
131
- if result.lower() == user_query.strip().lower():
132
- st.success(f"**`{user_query.strip()}`** → no change needed → **`{result}`**")
133
- else:
134
- st.info(f"**`{user_query.strip()}`** → **`{result}`**")
135
-
136
- with meta_col:
137
- st.metric("Latency", f"{elapsed_ms:.2f} ms")
138
 
139
  # Check if it's in the benchmark dataset
140
  match = df[df["noisy"].str.lower() == user_query.strip().lower()]
 
122
  )
123
 
124
  if user_query.strip():
 
125
  result = norm.normalize(user_query.strip())
 
126
 
127
+ if result.lower() == user_query.strip().lower():
128
+ st.success(f"**`{user_query.strip()}`** → no change needed → **`{result}`**")
129
+ else:
130
+ st.info(f"**`{user_query.strip()}`** → **`{result}`**")
 
 
 
 
 
131
 
132
  # Check if it's in the benchmark dataset
133
  match = df[df["noisy"].str.lower() == user_query.strip().lower()]