Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,10 +52,10 @@ def generate(window_size, overlap, normalize, include_baselines,
|
|
| 52 |
include_familiarization, profile: gr.OAuthProfile | None):
|
| 53 |
"""Run the pipeline with the chosen parameters and return a parquet file."""
|
| 54 |
if profile is None:
|
| 55 |
-
return None, "
|
| 56 |
if profile.username.lower() not in ALLOWLIST:
|
| 57 |
return None, (
|
| 58 |
-
f"
|
| 59 |
f"Request access from **@{OWNER}** (to be added to the allowlist)."
|
| 60 |
)
|
| 61 |
|
|
@@ -73,7 +73,7 @@ def generate(window_size, overlap, normalize, include_baselines,
|
|
| 73 |
f"_{normalize}.parquet")
|
| 74 |
out = os.path.join(tempfile.mkdtemp(), fname)
|
| 75 |
df.to_parquet(out, index=False)
|
| 76 |
-
msg = (f"
|
| 77 |
f"({df['subject'].nunique()} subjects) — `{fname}`")
|
| 78 |
return out, msg
|
| 79 |
|
|
|
|
| 52 |
include_familiarization, profile: gr.OAuthProfile | None):
|
| 53 |
"""Run the pipeline with the chosen parameters and return a parquet file."""
|
| 54 |
if profile is None:
|
| 55 |
+
return None, "Sign in with your Hugging Face account to generate."
|
| 56 |
if profile.username.lower() not in ALLOWLIST:
|
| 57 |
return None, (
|
| 58 |
+
f"Access not granted for **@{profile.username}**.\n\n"
|
| 59 |
f"Request access from **@{OWNER}** (to be added to the allowlist)."
|
| 60 |
)
|
| 61 |
|
|
|
|
| 73 |
f"_{normalize}.parquet")
|
| 74 |
out = os.path.join(tempfile.mkdtemp(), fname)
|
| 75 |
df.to_parquet(out, index=False)
|
| 76 |
+
msg = (f"**{len(df)} windows × {df.shape[1]} columns** "
|
| 77 |
f"({df['subject'].nunique()} subjects) — `{fname}`")
|
| 78 |
return out, msg
|
| 79 |
|