Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
from huggingface_hub import hf_hub_download
|
@@ -7,7 +10,7 @@ from geopy.exc import GeocoderTimedOut, GeocoderUnavailable
|
|
7 |
import time
|
8 |
|
9 |
# Загрузка модели из репозитория HF
|
10 |
-
model_path = hf_hub_download(repo_id="Nikgorby/
|
11 |
model = joblib.load(model_path)
|
12 |
|
13 |
def predict(features_lst: list, model):
|
@@ -112,7 +115,7 @@ iface = gr.Interface(
|
|
112 |
gr.Textbox(label="Количество школ рядом"),
|
113 |
gr.Textbox(label="Среднее расстояние до школы, миль"),
|
114 |
],
|
115 |
-
outputs=[gr.Textbox(label="
|
116 |
gr.Textbox(label="Предсказание, $")],
|
117 |
title=title,
|
118 |
description=description,
|
|
|
1 |
+
'''
|
2 |
+
Приложение для запуска на Hugging Face Spaces
|
3 |
+
'''
|
4 |
import gradio as gr
|
5 |
import pandas as pd
|
6 |
from huggingface_hub import hf_hub_download
|
|
|
10 |
import time
|
11 |
|
12 |
# Загрузка модели из репозитория HF
|
13 |
+
model_path = hf_hub_download(repo_id="Nikgorby/real_estate_predict", filename="random_forest_model (1).pkl")
|
14 |
model = joblib.load(model_path)
|
15 |
|
16 |
def predict(features_lst: list, model):
|
|
|
115 |
gr.Textbox(label="Количество школ рядом"),
|
116 |
gr.Textbox(label="Среднее расстояние до школы, миль"),
|
117 |
],
|
118 |
+
outputs=[gr.Textbox(label="Строка фичей, передаваемая в модель (для контроля)"),
|
119 |
gr.Textbox(label="Предсказание, $")],
|
120 |
title=title,
|
121 |
description=description,
|