aliabd HF staff commited on
Commit
aad737d
1 Parent(s): fc3090d

Upload with huggingface_hub

Browse files
Files changed (3) hide show
  1. DESCRIPTION.md +1 -0
  2. README.md +1 -1
  3. app.py +0 -6
DESCRIPTION.md ADDED
@@ -0,0 +1 @@
 
1
+ Calculate taxes using Textbox, Radio, and Dataframe components
README.md CHANGED
@@ -1,7 +1,7 @@
1
 
2
  ---
3
  title: tax_calculator
4
- emoji: 🤗
5
  colorFrom: indigo
6
  colorTo: indigo
7
  sdk: gradio
1
 
2
  ---
3
  title: tax_calculator
4
+ emoji: 🔥
5
  colorFrom: indigo
6
  colorTo: indigo
7
  sdk: gradio
app.py CHANGED
@@ -1,9 +1,5 @@
1
- # URL: https://huggingface.co/spaces/gradio/tax_calculator
2
- # DESCRIPTION: Calculate taxes using Textbox, Radio, and Dataframe components
3
- # imports
4
  import gradio as gr
5
 
6
- # define core fn
7
  def tax_calculator(income, marital_status, assets):
8
  tax_brackets = [(10, 0), (25, 8), (60, 12), (120, 20), (250, 30)]
9
  total_deductible = sum(assets["Cost"])
@@ -21,7 +17,6 @@ def tax_calculator(income, marital_status, assets):
21
 
22
  return round(total_tax)
23
 
24
- # define interface
25
  demo = gr.Interface(
26
  tax_calculator,
27
  [
@@ -40,5 +35,4 @@ demo = gr.Interface(
40
  ],
41
  )
42
 
43
- # launch
44
  demo.launch()
 
 
 
1
  import gradio as gr
2
 
 
3
  def tax_calculator(income, marital_status, assets):
4
  tax_brackets = [(10, 0), (25, 8), (60, 12), (120, 20), (250, 30)]
5
  total_deductible = sum(assets["Cost"])
17
 
18
  return round(total_tax)
19
 
 
20
  demo = gr.Interface(
21
  tax_calculator,
22
  [
35
  ],
36
  )
37
 
 
38
  demo.launch()