Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import numpy as np
|
|
5 |
# Load the model and unique brand values
|
6 |
model = joblib.load('model.joblib')
|
7 |
unique_values = joblib.load('unique_values.joblib')
|
8 |
-
brand_values = unique_values['Brand']
|
9 |
|
10 |
# Define the prediction function
|
11 |
def predict(brand, screen_size, resolution_width, resolution_height):
|
@@ -26,7 +26,7 @@ def predict(brand, screen_size, resolution_width, resolution_height):
|
|
26 |
interface = gr.Interface(
|
27 |
fn=predict,
|
28 |
inputs=[
|
29 |
-
gr.Dropdown(
|
30 |
gr.Textbox(label="Screen Size"),
|
31 |
gr.Textbox(label="Resolution (Width)"),
|
32 |
gr.Textbox(label="Resolution (Height)")
|
|
|
5 |
# Load the model and unique brand values
|
6 |
model = joblib.load('model.joblib')
|
7 |
unique_values = joblib.load('unique_values.joblib')
|
8 |
+
brand_values = list(unique_values['Brand'])
|
9 |
|
10 |
# Define the prediction function
|
11 |
def predict(brand, screen_size, resolution_width, resolution_height):
|
|
|
26 |
interface = gr.Interface(
|
27 |
fn=predict,
|
28 |
inputs=[
|
29 |
+
gr.Dropdown(brand_values, label="Brand"),
|
30 |
gr.Textbox(label="Screen Size"),
|
31 |
gr.Textbox(label="Resolution (Width)"),
|
32 |
gr.Textbox(label="Resolution (Height)")
|