dailingx commited on
Commit
0970521
Β·
verified Β·
1 Parent(s): 9f794d1

Update run.py

Browse files
Files changed (1) hide show
  1. run.py +8 -2
run.py CHANGED
@@ -1,8 +1,12 @@
1
  import gradio as gr
2
- from huggingface.user import HFUser, GR_CONF
3
 
4
  Theme = gr.Theme.load(GR_CONF["theme"])
5
  GR_CONF["theme"] = Theme
 
 
 
 
6
 
7
  def login(token):
8
  u = HFUser.from_token(token)
@@ -12,6 +16,7 @@ def show_time(u, name):
12
  return u.ping(name), gr.Column(visible=True)
13
 
14
  def list_dataset(u, repo):
 
15
  files = u.list_dataset(repo)
16
  if repo == "OpenVideo/Sample-2k":
17
  print(f"files is: {files}")
@@ -57,7 +62,8 @@ with gr.Blocks(**GR_CONF) as Core:
57
  time= gr.Textbox(label="Time", interactive=False, scale=1)
58
 
59
  with gr.Column(visible=False) as Repo:
60
- raw_dataset= gr.Textbox("OpenVideo/pexels-raw", label="Raw Dataset")
 
61
  _list = gr.Button("List", variant='secondary', size='sm')
62
 
63
  with gr.Column(visible=False) as Batch:
 
1
  import gradio as gr
2
+ from user import HFUser, GR_CONF
3
 
4
  Theme = gr.Theme.load(GR_CONF["theme"])
5
  GR_CONF["theme"] = Theme
6
+ dataset_options = [
7
+ "OpenVideo/pexels-raw",
8
+ "OpenVideo/Sample-2k",
9
+ ]
10
 
11
  def login(token):
12
  u = HFUser.from_token(token)
 
16
  return u.ping(name), gr.Column(visible=True)
17
 
18
  def list_dataset(u, repo):
19
+ print(f"repo is: {repo}")
20
  files = u.list_dataset(repo)
21
  if repo == "OpenVideo/Sample-2k":
22
  print(f"files is: {files}")
 
62
  time= gr.Textbox(label="Time", interactive=False, scale=1)
63
 
64
  with gr.Column(visible=False) as Repo:
65
+ # raw_dataset= gr.Textbox("OpenVideo/pexels-raw", label="Raw Dataset")
66
+ raw_dataset = gr.Dropdown(choices=dataset_options, label="Raw Dataset")
67
  _list = gr.Button("List", variant='secondary', size='sm')
68
 
69
  with gr.Column(visible=False) as Batch: