Update app.py
Browse files
app.py
CHANGED
|
@@ -913,7 +913,12 @@ def retrieveMCCol(gc):
|
|
| 913 |
newMcTNames.append(i)
|
| 914 |
return newMcTNames
|
| 915 |
|
| 916 |
-
def getdropdownValues(gc,spreadsheet_service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 917 |
dropdownValues=[]
|
| 918 |
allIds=gc.spreadsheet_ids()
|
| 919 |
for spreadsheetId in allIds:
|
|
@@ -1305,10 +1310,12 @@ with gr.Blocks(css="#search {background: green}") as mainBlock:
|
|
| 1305 |
# out3=gr.HTML( )
|
| 1306 |
|
| 1307 |
out3=gr.HTML()
|
|
|
|
| 1308 |
|
| 1309 |
# getMeasurement(plan,SaveOP) #drop, check
|
| 1310 |
show_button.click(fn=getMeasurement, inputs=[drop, check ,check1, dp,in2,in3,in4,in5,in6,in7,in8,in9,in10,in11,in12],outputs=img1)
|
| 1311 |
buttonSaveDf.click(fn=saveExcel,inputs=[out2,project])
|
|
|
|
| 1312 |
# clr_btn.click(fn=clear,outputs=[project,radio_button,check,drop])
|
| 1313 |
# btn1.click(fn=PickColorContours, inputs=[dp,in1,in2,in3,in4,in5,in6,in7,in8,in9,in10,in11], outputs=out1)
|
| 1314 |
#secoond part
|
|
|
|
| 913 |
newMcTNames.append(i)
|
| 914 |
return newMcTNames
|
| 915 |
|
| 916 |
+
def getdropdownValues(): #gc,spreadsheet_service
|
| 917 |
+
credentials = service_account.Credentials.from_service_account_file('credentials.json', scopes=SCOPES)
|
| 918 |
+
spreadsheet_service = build('sheets', 'v4', credentials=credentials)
|
| 919 |
+
drive_service = build('drive', 'v3', credentials=credentials)
|
| 920 |
+
gc = pygsheets.authorize(custom_credentials=credentials, client_secret='credentials.json')
|
| 921 |
+
|
| 922 |
dropdownValues=[]
|
| 923 |
allIds=gc.spreadsheet_ids()
|
| 924 |
for spreadsheetId in allIds:
|
|
|
|
| 1310 |
# out3=gr.HTML( )
|
| 1311 |
|
| 1312 |
out3=gr.HTML()
|
| 1313 |
+
btn1=gr.Button('Save updated MC-T Names')
|
| 1314 |
|
| 1315 |
# getMeasurement(plan,SaveOP) #drop, check
|
| 1316 |
show_button.click(fn=getMeasurement, inputs=[drop, check ,check1, dp,in2,in3,in4,in5,in6,in7,in8,in9,in10,in11,in12],outputs=img1)
|
| 1317 |
buttonSaveDf.click(fn=saveExcel,inputs=[out2,project])
|
| 1318 |
+
btn1.click(fn=getdropdownValues,every=10)
|
| 1319 |
# clr_btn.click(fn=clear,outputs=[project,radio_button,check,drop])
|
| 1320 |
# btn1.click(fn=PickColorContours, inputs=[dp,in1,in2,in3,in4,in5,in6,in7,in8,in9,in10,in11], outputs=out1)
|
| 1321 |
#secoond part
|