vikramvasudevan commited on
Commit
1a6b60f
·
verified ·
1 Parent(s): 10bc0fb

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app.py +5 -2
  2. downloader.py +1 -1
app.py CHANGED
@@ -238,7 +238,10 @@ with gr.Blocks() as demo:
238
  with gr.Row():
239
  gr.Column()
240
  download_ready_btn = gr.DownloadButton(
241
- label="Click to Download", visible=False, variant="primary", scale=0
 
 
 
242
  )
243
  gr.Column()
244
 
@@ -459,7 +462,7 @@ with gr.Blocks() as demo:
459
  )
460
  question = gr.Textbox(
461
  label="Ask a Question",
462
- placeholder="e.g., What topics did they cover on AI ethics?",
463
  submit_btn=True,
464
  )
465
  gr.Column(scale=2)
 
238
  with gr.Row():
239
  gr.Column()
240
  download_ready_btn = gr.DownloadButton(
241
+ label="Click to Download",
242
+ visible=False,
243
+ variant="primary",
244
+ scale=0,
245
  )
246
  gr.Column()
247
 
 
462
  )
463
  question = gr.Textbox(
464
  label="Ask a Question",
465
+ placeholder="e.g., How to write the letter Aa in grantham?",
466
  submit_btn=True,
467
  )
468
  gr.Column(scale=2)
downloader.py CHANGED
@@ -17,4 +17,4 @@ def export_channel_json(channel_id):
17
  fd, path = tempfile.mkstemp(suffix=".json")
18
  with os.fdopen(fd, "w", encoding="utf-8") as f:
19
  json.dump(data, f, indent=2, ensure_ascii=False, default=json_serializer)
20
- return path # return file path for gr.File / gr.DownloadButton
 
17
  fd, path = tempfile.mkstemp(suffix=".json")
18
  with os.fdopen(fd, "w", encoding="utf-8") as f:
19
  json.dump(data, f, indent=2, ensure_ascii=False, default=json_serializer)
20
+ return path