shivmeev commited on
Commit
59ea95e
·
verified ·
1 Parent(s): 046d86a

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -20,13 +20,26 @@ def process_data(input_dataframe):
20
  wineq_t = torch.from_numpy(wineq_np)
21
  return forward(model, wineq_t)
22
  return "Invalid input type"
23
-
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  with gr.Blocks() as demo:
25
  gr.Markdown("Enter your wine data below:")
26
  input_df = gr.Dataframe(
27
  row_count=(1, "dynamic"), # Allows adding/removing rows
28
  col_count=(11, "dynamic"), # Allows adding/removing columns
29
- headers=list(df.columns)[:-1],
30
  label="Input Data",
31
  interactive=True,
32
  type="pandas" # Specify the desired input type for your function
 
20
  wineq_t = torch.from_numpy(wineq_np)
21
  return forward(model, wineq_t)
22
  return "Invalid input type"
23
+
24
+ columns = ['fixed acidity',
25
+ 'volatile acidity',
26
+ 'citric acid',
27
+ 'residual sugar',
28
+ 'chlorides',
29
+ 'free sulfur dioxide',
30
+ 'total sulfur dioxide',
31
+ 'density',
32
+ 'pH',
33
+ 'sulphates',
34
+ 'alcohol']
35
+
36
+
37
  with gr.Blocks() as demo:
38
  gr.Markdown("Enter your wine data below:")
39
  input_df = gr.Dataframe(
40
  row_count=(1, "dynamic"), # Allows adding/removing rows
41
  col_count=(11, "dynamic"), # Allows adding/removing columns
42
+ headers=columns,
43
  label="Input Data",
44
  interactive=True,
45
  type="pandas" # Specify the desired input type for your function