rahul7star commited on
Commit
a84bcbe
·
verified ·
1 Parent(s): 025e011

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -4
app.py CHANGED
@@ -157,6 +157,9 @@ def download_markdown(path: str) -> str:
157
  def make_story_card(story: dict) -> str:
158
  title = html.escape(story["title"])
159
 
 
 
 
160
  story_md = download_markdown(story["markdown_path"])
161
  story_md_html = gr.Markdown().postprocess(story_md)
162
 
@@ -188,9 +191,12 @@ def make_story_card(story: dict) -> str:
188
  return f"""
189
  <section class="story-card">
190
 
191
- <!-- ✅ ONLY TITLE -->
192
  <h2 class="story-title">{title}</h2>
193
 
 
 
 
194
  {video_html}
195
 
196
  <div class="story-content">
@@ -205,7 +211,6 @@ def make_story_card(story: dict) -> str:
205
 
206
  </section>
207
  """
208
-
209
  def build_showcase_html():
210
  stories = collect_stories()
211
 
@@ -314,10 +319,17 @@ body, .gradio-container {
314
  font-weight: 700;
315
  color: var(--text);
316
  }
317
-
 
 
 
 
318
  .stat-label {
319
  color: var(--muted);
320
- font-size: 12px;
 
 
 
321
  }
322
 
323
  /* ================= CARD ================= */
 
157
  def make_story_card(story: dict) -> str:
158
  title = html.escape(story["title"])
159
 
160
+ # ✅ Convert timestamp → readable time
161
+ created_time = format_ts(story["timestamp"])
162
+
163
  story_md = download_markdown(story["markdown_path"])
164
  story_md_html = gr.Markdown().postprocess(story_md)
165
 
 
191
  return f"""
192
  <section class="story-card">
193
 
194
+ <!-- ✅ TITLE -->
195
  <h2 class="story-title">{title}</h2>
196
 
197
+ <!-- ✅ NEW: GENERATED TIME -->
198
+ <div class="story-time">Generated on: {created_time}</div>
199
+
200
  {video_html}
201
 
202
  <div class="story-content">
 
211
 
212
  </section>
213
  """
 
214
  def build_showcase_html():
215
  stories = collect_stories()
216
 
 
319
  font-weight: 700;
320
  color: var(--text);
321
  }
322
+ .story-time {
323
+ font-size: 13px;
324
+ color: #6b7280;
325
+ margin-bottom: 12px;
326
+ }
327
  .stat-label {
328
  color: var(--muted);
329
+ font-size: 12px;.story-time {
330
+ font-size: 13px;
331
+ color: #6b7280;
332
+ margin-bottom: 12px;
333
  }
334
 
335
  /* ================= CARD ================= */