quantumiracle-git commited on
Commit
a73a688
·
1 Parent(s): 064e853

no callback

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -22,7 +22,7 @@ ENVS = ['ShadowHand', 'ShadowHandCatchAbreast', 'ShadowHandOver', 'ShadowHandBlo
22
 
23
  # download data from huggingface dataset
24
  # dataset = load_dataset("quantumiracle-git/robotinder-data")
25
- os.remove('.git/hooks/pre-push') # https://github.com/git-lfs/git-lfs/issues/853
26
  LOAD_DATA_GOOGLE_DRIVE = False
27
 
28
  if LOAD_DATA_GOOGLE_DRIVE: # download data from google drive
@@ -282,10 +282,10 @@ def build_interface(iter=3, data_folder=VIDEO_PATH):
282
  HF_TOKEN = os.getenv('HF_TOKEN')
283
  print(HF_TOKEN)
284
  HF_TOKEN = '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' # my HF token
285
- # hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "crowdsourced-robotinder-demo") # HuggingFace logger instead of local one: https://github.com/gradio-app/gradio/blob/master/gradio/flagging.py
286
- hf_writer = HuggingFaceDatasetSaver(HF_TOKEN, "crowdsourced-robotinder-demo")
287
- # callback = gr.CSVLogger()
288
- callback = hf_writer
289
 
290
  # parse the video folder
291
  files = parse_envs()
@@ -332,7 +332,7 @@ def build_interface(iter=3, data_folder=VIDEO_PATH):
332
  btn2 = gr.Button("Next")
333
 
334
  # This needs to be called at some point prior to the first call to callback.flag()
335
- callback.setup([user_choice, left, right], "flagged_data_points")
336
 
337
  # btn1.click(fn=replay, inputs=[left, right], outputs=[left, right])
338
  btn2.click(fn=update, inputs=[user_choice, left, right, choose_env], outputs=[left, right, str_env_name])
 
22
 
23
  # download data from huggingface dataset
24
  # dataset = load_dataset("quantumiracle-git/robotinder-data")
25
+ # os.remove('.git/hooks/pre-push') # https://github.com/git-lfs/git-lfs/issues/853
26
  LOAD_DATA_GOOGLE_DRIVE = False
27
 
28
  if LOAD_DATA_GOOGLE_DRIVE: # download data from google drive
 
282
  HF_TOKEN = os.getenv('HF_TOKEN')
283
  print(HF_TOKEN)
284
  HF_TOKEN = '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' # my HF token
285
+ ## hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "crowdsourced-robotinder-demo") # HuggingFace logger instead of local one: https://github.com/gradio-app/gradio/blob/master/gradio/flagging.py
286
+ ## callback = gr.CSVLogger()
287
+ # hf_writer = HuggingFaceDatasetSaver(HF_TOKEN, "crowdsourced-robotinder-demo")
288
+ # callback = hf_writer
289
 
290
  # parse the video folder
291
  files = parse_envs()
 
332
  btn2 = gr.Button("Next")
333
 
334
  # This needs to be called at some point prior to the first call to callback.flag()
335
+ # callback.setup([user_choice, left, right], "flagged_data_points")
336
 
337
  # btn1.click(fn=replay, inputs=[left, right], outputs=[left, right])
338
  btn2.click(fn=update, inputs=[user_choice, left, right, choose_env], outputs=[left, right, str_env_name])