Spaces:
Sleeping
Sleeping
Commit
·
25288f7
1
Parent(s):
ce1ba54
tst inference
Browse files
app.py
CHANGED
@@ -1,7 +1,21 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
def greet(name):
|
4 |
-
return "Hello " + name + "
|
5 |
|
6 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
import joblib
|
3 |
+
from skops.hub_utils import download
|
4 |
+
|
5 |
+
download("stummala521/AI4SAR", "path_to_folder")
|
6 |
+
model = joblib.load(
|
7 |
+
"model.pkl"
|
8 |
+
)
|
9 |
+
|
10 |
+
test_data = {
|
11 |
+
"location_found_elevation": 1500,
|
12 |
+
"situation": "lost"
|
13 |
+
}
|
14 |
+
|
15 |
+
output = model.predict([test_data])
|
16 |
|
17 |
def greet(name):
|
18 |
+
return "Hello " + name + "!" + output
|
19 |
|
20 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
21 |
demo.launch()
|