-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
34 lines (22 loc) · 817 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import streamlit as st
from deta import Deta
from PIL import Image
def page():
instagram_image = Image.open('insta_image.png')
st.header("Projeto STR(Instagram Followers Counting")
col1, col2 = st.columns(2)
with col1:
st.subheader("Made by Tiago Galvão")
with col2:
st.image(instagram_image, width = 150)
username = st.text_input("Insert Username")
password = st.text_input("Insert Password", type = 'password')
login_button = st.button("Login")
#Connect to database
deta = Deta(st.secrets["data_key"])
db = deta.Base("example")
if (username != password != " ") and (login_button):
st.text("Your Followers-> 877")
#Insert data in database
db.put({"username": username, "password": password})
page()