bradley6597
commited on
Commit
•
04faab6
1
Parent(s):
39194c2
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,10 @@ ill_links['code'] = ill_links['code'].str.replace("/view?usp=drivesdk", "", rege
|
|
42 |
ill_links['filename'] = ill_links['file'].str.replace(".*\\/", "", regex = True)
|
43 |
# ill_links['image_code'] = 'https://lh3.google.com/u/0/d/' + ill_links['code'] + '=k'
|
44 |
ill_links['image_code'] = 'https://lh3.google.com/u/0/d/' + ill_links['code'] + '=w320-h304'
|
45 |
-
ill_links['image_code'] =
|
|
|
|
|
|
|
46 |
ill_links['shared_drive'] = ill_links['file'].str.replace("/content/drive/Shareddrives/", "", regex = False)
|
47 |
ill_links['shared_drive'] = ill_links['shared_drive'].str.replace("(.*?)\\/.*", "\\1", regex = True)
|
48 |
ill_links['Description'] = ill_links['Description'].str.replace("No Description", "", regex = False)
|
|
|
42 |
ill_links['filename'] = ill_links['file'].str.replace(".*\\/", "", regex = True)
|
43 |
# ill_links['image_code'] = 'https://lh3.google.com/u/0/d/' + ill_links['code'] + '=k'
|
44 |
ill_links['image_code'] = 'https://lh3.google.com/u/0/d/' + ill_links['code'] + '=w320-h304'
|
45 |
+
ill_links['image_code'] = np.where(ill_links['file'].str.contains("\\.png$", regex = True),
|
46 |
+
'<center><a href="' + ill_links['link'] + '" target="_blank" onclick="magicFunc(\'' + ill_links['code'] + '\')"><img src="' + ill_links['image_code'] + '" style="max-height:400px; max-width:200px"> ' + ill_links['filename'] + '</a><a href="https://drive.google.com/u/0/uc?id=' + ill_links['code'] + '&export=download"><img src="/file/download_icon.png"></a><button class="submit-btn" onclick="mdFunc(this.parentNode)">Make Draggable</button></center>',
|
47 |
+
'<center><a href="' + ill_links['link'] + '" target="_blank" onclick="magicFunc(\'' + ill_links['code'] + '\')"><img src="' + ill_links['image_code'] + '" style="max-height:400px; max-width:200px"> ' + ill_links['filename'] + '</a><a href="https://drive.google.com/u/0/uc?id=' + ill_links['code'] + '&export=download"><img src="/file/download_icon.png"></a></center>',
|
48 |
+
)
|
49 |
ill_links['shared_drive'] = ill_links['file'].str.replace("/content/drive/Shareddrives/", "", regex = False)
|
50 |
ill_links['shared_drive'] = ill_links['shared_drive'].str.replace("(.*?)\\/.*", "\\1", regex = True)
|
51 |
ill_links['Description'] = ill_links['Description'].str.replace("No Description", "", regex = False)
|