Spaces:
Runtime error
Runtime error
Vishakaraj
commited on
Commit
•
74ce6d9
1
Parent(s):
0fd633f
Upload folder using huggingface_hub
Browse files
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
test.las filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -4,5 +4,3 @@ app_file: app.py
|
|
4 |
sdk: gradio
|
5 |
sdk_version: 3.43.1
|
6 |
---
|
7 |
-
|
8 |
-
This is a technology demonstration of Trimble AI's 3D Point Cloud Segmentation running on Trimble Cloud Core's Pegasus Processing Framework. The point cloud is uploaded on behalf of the user into Pegasus, then the result is offered as a downloadable link.
|
|
|
4 |
sdk: gradio
|
5 |
sdk_version: 3.43.1
|
6 |
---
|
|
|
|
app.py
CHANGED
@@ -8,6 +8,7 @@ import gradio as gr
|
|
8 |
username = os.environ.get("CLIENT_ID")
|
9 |
passwd = os.environ.get("CLIENT_SECRETS")
|
10 |
|
|
|
11 |
def authorization():
|
12 |
url = "https://stage.id.trimblecloud.com/oauth/token"
|
13 |
credential_pair = f"{username}:{passwd}"
|
@@ -125,27 +126,31 @@ def download_output(auth_token, output_filename):
|
|
125 |
|
126 |
return download_url
|
127 |
|
|
|
128 |
def predict(input_file):
|
129 |
input_filename = "input.las"
|
130 |
output_filename = "output.las"
|
131 |
auth_token = authorization()
|
132 |
file_upload_url = create_file(auth_token, input_filename)
|
133 |
upload_file(file_upload_url, input_file)
|
134 |
-
execution_id = start_execution(
|
135 |
-
auth_token, input_filename, output_filename
|
136 |
-
)
|
137 |
download_url = track_execution(auth_token, execution_id, output_filename)
|
138 |
|
139 |
html_content = f'<a href="{download_url}">Download output file</a>'
|
140 |
|
|
|
|
|
|
|
|
|
141 |
|
142 |
-
return "Inference has finished. Click the download button to access the output file", html_content
|
143 |
|
144 |
demo = gr.Interface(
|
145 |
-
title="Point Cloud
|
146 |
fn=predict,
|
147 |
inputs=gr.File(file_types=[".las"], file_count="single"),
|
148 |
outputs=[gr.Textbox(), "html"],
|
|
|
|
|
149 |
)
|
150 |
|
151 |
-
demo.queue(concurrency_count=512, max_size=512).launch()
|
|
|
8 |
username = os.environ.get("CLIENT_ID")
|
9 |
passwd = os.environ.get("CLIENT_SECRETS")
|
10 |
|
11 |
+
|
12 |
def authorization():
|
13 |
url = "https://stage.id.trimblecloud.com/oauth/token"
|
14 |
credential_pair = f"{username}:{passwd}"
|
|
|
126 |
|
127 |
return download_url
|
128 |
|
129 |
+
|
130 |
def predict(input_file):
|
131 |
input_filename = "input.las"
|
132 |
output_filename = "output.las"
|
133 |
auth_token = authorization()
|
134 |
file_upload_url = create_file(auth_token, input_filename)
|
135 |
upload_file(file_upload_url, input_file)
|
136 |
+
execution_id = start_execution(auth_token, input_filename, output_filename)
|
|
|
|
|
137 |
download_url = track_execution(auth_token, execution_id, output_filename)
|
138 |
|
139 |
html_content = f'<a href="{download_url}">Download output file</a>'
|
140 |
|
141 |
+
return (
|
142 |
+
"Inference has finished. Click the download button to access the output file",
|
143 |
+
html_content,
|
144 |
+
)
|
145 |
|
|
|
146 |
|
147 |
demo = gr.Interface(
|
148 |
+
title="Point Cloud Segmentation-Trimble Cloud",
|
149 |
fn=predict,
|
150 |
inputs=gr.File(file_types=[".las"], file_count="single"),
|
151 |
outputs=[gr.Textbox(), "html"],
|
152 |
+
examples=["test.las"],
|
153 |
+
description="This is a technology demonstration of Trimble AI's 3D Point Cloud Segmentation running on Trimble Cloud Core's Pegasus Processing Framework. The point cloud is uploaded on behalf of the user into Pegasus, then the result is offered as a downloadable link.",
|
154 |
)
|
155 |
|
156 |
+
demo.queue(concurrency_count=512, max_size=512).launch()
|
test.las
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:727bbb3b6a5f4a4a1367992d72a4d0fdb7b6249bb1df965b420505f4f414fb57
|
3 |
+
size 132575085
|