Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -165,20 +165,34 @@ def predict_price_func(location, sqft, bath, bhk):
|
|
165 |
|
166 |
return lr_clf.predict([xdash])[0]
|
167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
import gradio as gr
|
169 |
|
170 |
-
from gradio.components import Textbox, Number
|
171 |
-
|
172 |
interface = gr.Interface(
|
173 |
fn=predict_price_func,
|
174 |
inputs=[
|
175 |
-
gr.
|
176 |
-
gr.
|
177 |
-
gr.
|
178 |
-
gr.
|
179 |
],
|
180 |
-
outputs="
|
181 |
-
theme="huggingface"
|
182 |
)
|
183 |
|
184 |
-
interface.launch()
|
|
|
165 |
|
166 |
return lr_clf.predict([xdash])[0]
|
167 |
|
168 |
+
# import gradio as gr
|
169 |
+
|
170 |
+
# from gradio.components import Textbox, Number
|
171 |
+
|
172 |
+
# interface = gr.Interface(
|
173 |
+
# fn=predict_price_func,
|
174 |
+
# inputs=[
|
175 |
+
# gr.inputs.Textbox(), # For location (text)
|
176 |
+
# gr.inputs.Number(), # For area (numeric)
|
177 |
+
# gr.inputs.Number(), # For bedrooms (numeric)
|
178 |
+
# gr.inputs.Number() # For bathrooms (numeric)
|
179 |
+
# ],
|
180 |
+
# outputs="text",
|
181 |
+
# theme="huggingface"
|
182 |
+
# )
|
183 |
+
|
184 |
+
# interface.launch()
|
185 |
import gradio as gr
|
186 |
|
|
|
|
|
187 |
interface = gr.Interface(
|
188 |
fn=predict_price_func,
|
189 |
inputs=[
|
190 |
+
gr.Textbox(label="Location"),
|
191 |
+
gr.Number(label="Area (sqft)"),
|
192 |
+
gr.Number(label="Bedrooms"),
|
193 |
+
gr.Number(label="Bathrooms")
|
194 |
],
|
195 |
+
outputs=gr.Textbox(label="Predicted Price")
|
|
|
196 |
)
|
197 |
|
198 |
+
interface.launch()
|