Sujatha commited on
Commit
f9800c0
·
verified ·
1 Parent(s): ca787f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -21,7 +21,7 @@ data_config = DataConfig(
21
 
22
  model_config = CategoryEmbeddingModelConfig(
23
  task="classification",
24
- layers="64-64", # Hidden layer sizes for the model
25
  learning_rate=1e-3
26
  )
27
 
@@ -54,16 +54,16 @@ def classify(feature1, feature2, feature3):
54
  iface = gr.Interface(
55
  fn=classify,
56
  inputs=[
57
- gr.inputs.Slider(0, 1, step=0.1, label="Feature 1"),
58
- gr.inputs.Slider(0, 1, step=0.1, label="Feature 2"),
59
- gr.inputs.Slider(0, 1, step=0.1, label="Feature 3")
60
  ],
61
  outputs="text",
62
  title="Tabular Classification with PyTorch Tabular",
63
  description="Classify entries based on tabular data"
64
  )
65
 
66
- # Launch with additional server settings for Hugging Face Spaces
67
  print("Launching Gradio Interface...")
68
  iface.launch(server_name="0.0.0.0", server_port=7860, share=True)
69
 
 
21
 
22
  model_config = CategoryEmbeddingModelConfig(
23
  task="classification",
24
+ layers="64-64",
25
  learning_rate=1e-3
26
  )
27
 
 
54
  iface = gr.Interface(
55
  fn=classify,
56
  inputs=[
57
+ gr.Slider(0, 1, step=0.1, label="Feature 1"),
58
+ gr.Slider(0, 1, step=0.1, label="Feature 2"),
59
+ gr.Slider(0, 1, step=0.1, label="Feature 3")
60
  ],
61
  outputs="text",
62
  title="Tabular Classification with PyTorch Tabular",
63
  description="Classify entries based on tabular data"
64
  )
65
 
66
+ # Launch the Gradio app with necessary server settings
67
  print("Launching Gradio Interface...")
68
  iface.launch(server_name="0.0.0.0", server_port=7860, share=True)
69