thbndi commited on
Commit
b4f8c8c
·
verified ·
1 Parent(s): 9875af9

Translate UI strings to English

Browse files
Files changed (4) hide show
  1. .DS_Store +0 -0
  2. README.md +2 -2
  3. __pycache__/app.cpython-314.pyc +0 -0
  4. app.py +14 -14
.DS_Store ADDED
Binary file (6.15 kB). View file
 
README.md CHANGED
@@ -3,7 +3,7 @@ title: MoveTSA Dataset Builder
3
  colorFrom: blue
4
  colorTo: indigo
5
  sdk: gradio
6
- sdk_version: 6.17.3
7
  app_file: app.py
8
  pinned: false
9
  hf_oauth: true
@@ -46,4 +46,4 @@ code needed.
46
  | `CODE_REPO` | variable (optional) | Pipeline-code dataset id (default `thbndi/MoveTSA`). |
47
 
48
  > First load downloads ~13 GB of raw SIMU logs; expect a slow cold start. Enable
49
- > **persistent storage** on the Space to avoid re-downloading on each restart.
 
3
  colorFrom: blue
4
  colorTo: indigo
5
  sdk: gradio
6
+ sdk_version: 5.9.1
7
  app_file: app.py
8
  pinned: false
9
  hf_oauth: true
 
46
  | `CODE_REPO` | variable (optional) | Pipeline-code dataset id (default `thbndi/MoveTSA`). |
47
 
48
  > First load downloads ~13 GB of raw SIMU logs; expect a slow cold start. Enable
49
+ > **persistent storage** on the Space to avoid re-downloading on each restart.
__pycache__/app.cpython-314.pyc CHANGED
Binary files a/__pycache__/app.cpython-314.pyc and b/__pycache__/app.cpython-314.pyc differ
 
app.py CHANGED
@@ -52,11 +52,11 @@ 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, "🔒 Connecte-toi avec ton compte Hugging Face pour générer."
56
  if profile.username.lower() not in ALLOWLIST:
57
  return None, (
58
- f"⛔ Accès non accordé pour **@{profile.username}**.\n\n"
59
- f"Demande l'accès à **@{OWNER}** (ajout à l'allowlist)."
60
  )
61
 
62
  df = build_windows(
@@ -73,18 +73,18 @@ 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"✅ **{len(df)} fenêtres × {df.shape[1]} colonnes** "
77
- f"({df['subject'].nunique()} sujets) — `{fname}`")
78
  return out, msg
79
 
80
 
81
  with gr.Blocks(title="MoveTSA dataset builder") as demo:
82
  gr.Markdown(
83
- "# 🚗 MoveTSA dataset builder\n"
84
- "Génère un parquet **HRV / BSI / RSP / simulateur** paramétré à partir "
85
- "des enregistrements bruts (privés). Tu télécharges **uniquement** le "
86
- "parquet généré — jamais les données brutes.\n\n"
87
- "1. Connecte-toi avec Hugging Face. 2. Règle les paramètres. 3. Génère."
88
  )
89
  gr.LoginButton()
90
  with gr.Row():
@@ -95,13 +95,13 @@ with gr.Blocks(title="MoveTSA dataset builder") as demo:
95
  normalize = gr.Dropdown(["zscore", "center", "none"],
96
  value="zscore", label="normalize")
97
  include_baselines = gr.Checkbox(
98
- value=True, label="inclure les baselines (B1–B4)")
99
  include_familiarization = gr.Checkbox(
100
- value=True, label="inclure la familiarisation (F)")
101
- btn = gr.Button("Générer le parquet", variant="primary")
102
  with gr.Column():
103
  status = gr.Markdown()
104
- out_file = gr.File(label="parquet généré")
105
 
106
  btn.click(
107
  generate,
 
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
 
62
  df = build_windows(
 
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
 
80
 
81
  with gr.Blocks(title="MoveTSA dataset builder") as demo:
82
  gr.Markdown(
83
+ "# MoveTSA dataset builder\n"
84
+ "Generate a **parametrised HRV / BSI / RSP / simulator** parquet from the "
85
+ "(private) raw recordings. You download **only** the generated parquet — "
86
+ "never the raw data.\n\n"
87
+ "1. Sign in with Hugging Face. 2. Set the parameters. 3. Generate."
88
  )
89
  gr.LoginButton()
90
  with gr.Row():
 
95
  normalize = gr.Dropdown(["zscore", "center", "none"],
96
  value="zscore", label="normalize")
97
  include_baselines = gr.Checkbox(
98
+ value=True, label="include baselines (B1–B4)")
99
  include_familiarization = gr.Checkbox(
100
+ value=True, label="include familiarization (F)")
101
+ btn = gr.Button("Generate parquet", variant="primary")
102
  with gr.Column():
103
  status = gr.Markdown()
104
+ out_file = gr.File(label="generated parquet")
105
 
106
  btn.click(
107
  generate,