nonstopiodemo commited on
Commit
8af627f
Β·
verified Β·
1 Parent(s): 6bcaabe

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +8 -8
  2. requirements.txt +3 -0
  3. streamlit_app.py +22 -0
README.md CHANGED
@@ -1,12 +1,12 @@
1
  ---
2
- title: Hulk
3
- emoji: πŸ‘
4
- colorFrom: red
5
- colorTo: red
6
  sdk: streamlit
7
- sdk_version: 1.38.0
8
- app_file: app.py
9
  pinned: false
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: hulk
3
+ emoji: πŸš€
4
+ colorFrom: blue
5
+ colorTo: green
6
  sdk: streamlit
7
+ sdk_version: "1.10.0"
8
+ app_file: streamlit_app.py
9
  pinned: false
10
  ---
11
+ # hulk
12
+ This is a Streamlit app generated and deployed automatically.
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ streamlit
2
+ altair==4.2.0
3
+ vega_datasets
streamlit_app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ st.title('Calculator')
4
+
5
+ num1 = st.number_input('Enter first number')
6
+ num2 = st.number_input('Enter second number')
7
+
8
+ operation = st.selectbox('Select operation', ['Add', 'Subtract', 'Multiply', 'Divide'])
9
+
10
+ if operation == 'Add':
11
+ result = num1 + num2
12
+ elif operation == 'Subtract':
13
+ result = num1 - num2
14
+ elif operation == 'Multiply':
15
+ result = num1 * num2
16
+ elif operation == 'Divide':
17
+ if num2 == 0:
18
+ result = 'Cannot divide by zero'
19
+ else:
20
+ result = num1 / num2
21
+
22
+ st.write('Result: ', result)