-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.py
23 lines (18 loc) · 771 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
import os
import streamlit as st
from random import randint
from utils import create_table, logs
st.markdown("<h3 style='text-align: center; color: #FFFFFF;'>DetectGPT</h3>", unsafe_allow_html=True)
st.markdown("<h5 style='text-align: center; color: #FFFFFF;'>We are here with AI technology to help you know the quality of your writing and prevent plagiarism</h5>", unsafe_allow_html=True)
text = st.text_area(label = "", placeholder="Input text here...")
isClick = st.button(label = "Submit")
if isClick:
score = randint(1, 100)
if score > 70:
st.error("Terdeteksi Plagiarisme")
else:
st.success("Terdeteksi Original")
if os.listdir("database").__len__() == 0:
create_table()
logs(text, score)
st.progress(score)