Spaces:
Sleeping
Sleeping
quantumiracle-git
commited on
Commit
·
348b569
1
Parent(s):
631846f
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,8 @@ def parse_envs(folder='./videos'):
|
|
66 |
|
67 |
def build_interface(iter=3, data_folder='./videos'):
|
68 |
HF_TOKEN = os.getenv('HF_TOKEN')
|
69 |
-
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "crowdsourced-robotinder-demo")
|
|
|
70 |
callback = hf_writer
|
71 |
|
72 |
# build gradio interface
|
@@ -96,7 +97,7 @@ def build_interface(iter=3, data_folder='./videos'):
|
|
96 |
btn2 = gr.Button("Next")
|
97 |
|
98 |
# This needs to be called at some point prior to the first call to callback.flag()
|
99 |
-
callback.setup([user_choice, left, right])
|
100 |
|
101 |
btn1.click(fn=replay, inputs=[left, right], outputs=[left, right])
|
102 |
btn2.click(fn=update, inputs=None, outputs=[left, right])
|
|
|
66 |
|
67 |
def build_interface(iter=3, data_folder='./videos'):
|
68 |
HF_TOKEN = os.getenv('HF_TOKEN')
|
69 |
+
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
|
70 |
+
# callback = gr.CSVLogger()
|
71 |
callback = hf_writer
|
72 |
|
73 |
# build gradio interface
|
|
|
97 |
btn2 = gr.Button("Next")
|
98 |
|
99 |
# This needs to be called at some point prior to the first call to callback.flag()
|
100 |
+
callback.setup([user_choice, left, right], "flagged_data_points")
|
101 |
|
102 |
btn1.click(fn=replay, inputs=[left, right], outputs=[left, right])
|
103 |
btn2.click(fn=update, inputs=None, outputs=[left, right])
|