Spaces:
Sleeping
Sleeping
added URL convert
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import json
|
2 |
import streamlit as st
|
3 |
import pandas as pd
|
@@ -11,6 +12,10 @@ query_params = st.experimental_get_query_params()
|
|
11 |
file_url = query_params.get("file_url", [None])[0]
|
12 |
|
13 |
if file_url:
|
|
|
|
|
|
|
|
|
14 |
input_gdf = gpd.read_file(file_url)
|
15 |
input_gdf = input_gdf.to_crs(epsg=7761) # Gujarat zone
|
16 |
|
|
|
1 |
+
import re
|
2 |
import json
|
3 |
import streamlit as st
|
4 |
import pandas as pd
|
|
|
12 |
file_url = query_params.get("file_url", [None])[0]
|
13 |
|
14 |
if file_url:
|
15 |
+
if file_url.startswith("https://drive.google.com/file/d/"):
|
16 |
+
ID = file_url.replace("https://drive.google.com/file/d/", "").split("/")[0]
|
17 |
+
file_url = f"https://drive.google.com/uc?id={ID}"
|
18 |
+
|
19 |
input_gdf = gpd.read_file(file_url)
|
20 |
input_gdf = input_gdf.to_crs(epsg=7761) # Gujarat zone
|
21 |
|