Spaces:
Sleeping
Sleeping
Commit ·
919ac0a
1
Parent(s): 0909d33
tst inference
Browse files- app.py +4 -5
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -2,6 +2,8 @@ import gradio as gr
|
|
| 2 |
import joblib
|
| 3 |
import requests
|
| 4 |
import os
|
|
|
|
|
|
|
| 5 |
|
| 6 |
# Download the model file
|
| 7 |
model_url = "https://huggingface.co/stummala521/AI4SAR/resolve/main/model.pkl"
|
|
@@ -15,12 +17,9 @@ with open(local_filename, 'wb') as f:
|
|
| 15 |
# Load the model
|
| 16 |
model = joblib.load(local_filename)
|
| 17 |
|
| 18 |
-
test_data =
|
| 19 |
-
"location_found_elevation": 1500,
|
| 20 |
-
"situation": "lost"
|
| 21 |
-
}]
|
| 22 |
|
| 23 |
-
output = model.predict(
|
| 24 |
|
| 25 |
def greet(name):
|
| 26 |
return "Hello " + name + "!" + str(output[0])
|
|
|
|
| 2 |
import joblib
|
| 3 |
import requests
|
| 4 |
import os
|
| 5 |
+
import pandas as pd
|
| 6 |
+
|
| 7 |
|
| 8 |
# Download the model file
|
| 9 |
model_url = "https://huggingface.co/stummala521/AI4SAR/resolve/main/model.pkl"
|
|
|
|
| 17 |
# Load the model
|
| 18 |
model = joblib.load(local_filename)
|
| 19 |
|
| 20 |
+
test_data = pd.DataFrame({'location_found_elevation': [0, 0, 0], 'situation': ['fake', 'fake', 'fake']})
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
output = model.predict(test_data)
|
| 23 |
|
| 24 |
def greet(name):
|
| 25 |
return "Hello " + name + "!" + str(output[0])
|
requirements.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
joblib==1.4.2
|
| 2 |
-
skops==0.10.0
|
|
|
|
|
|
| 1 |
joblib==1.4.2
|
| 2 |
+
skops==0.10.0
|
| 3 |
+
pandas==2.2.1
|