Spaces:
Sleeping
Sleeping
周倬孚
commited on
Commit
·
b7dc23f
1
Parent(s):
cf0da09
delete unnecessary code andswitch off local mode
Browse files
app.py
CHANGED
|
@@ -137,8 +137,8 @@ def on_textbox_change(session_index, session_manager, service, SHEET_ID):
|
|
| 137 |
return save_data(session_index, session_manager, service, SHEET_ID)
|
| 138 |
|
| 139 |
if __name__ == "__main__":
|
| 140 |
-
api_key = get_api_key(local=
|
| 141 |
-
service, SHEET_IDs = get_sheet_service(local=
|
| 142 |
SHEET_ID1, SHEET_ID2, SHEET_ID3 = SHEET_IDs
|
| 143 |
|
| 144 |
session_manager = SessionManager()
|
|
@@ -324,12 +324,5 @@ if __name__ == "__main__":
|
|
| 324 |
inputs=[session_index],
|
| 325 |
outputs=[save_result]
|
| 326 |
)
|
| 327 |
-
|
| 328 |
-
gr.HTML("""
|
| 329 |
-
<script>
|
| 330 |
-
setInterval(function() {
|
| 331 |
-
document.getElementById('save_btn').click();
|
| 332 |
-
}, 5000); // Auto-clicks every 30 seconds
|
| 333 |
-
</script>
|
| 334 |
-
""")
|
| 335 |
app.launch()
|
|
|
|
| 137 |
return save_data(session_index, session_manager, service, SHEET_ID)
|
| 138 |
|
| 139 |
if __name__ == "__main__":
|
| 140 |
+
api_key = get_api_key(local=False)
|
| 141 |
+
service, SHEET_IDs = get_sheet_service(local=False)
|
| 142 |
SHEET_ID1, SHEET_ID2, SHEET_ID3 = SHEET_IDs
|
| 143 |
|
| 144 |
session_manager = SessionManager()
|
|
|
|
| 324 |
inputs=[session_index],
|
| 325 |
outputs=[save_result]
|
| 326 |
)
|
| 327 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 328 |
app.launch()
|