Spaces:
Sleeping
Sleeping
File size: 1,999 Bytes
59ecefa 7f99c17 59ecefa 7f99c17 59ecefa 7f99c17 59ecefa 7f99c17 |
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
import streamlit as st
import pandas as pd
import pickle
def run():
# Load All Files
file_path = "https://drive.google.com/file/d/1iAlO-jScEJBa4_RaNGR7G_-xaUKKECGz/view?usp=sharing"
df_original = pd.read_csv(file_path)
index_columns = [
"The film was good and had a great story.",
"This movie is like nothing I've seen before.",
"One of the best films I've seen in a long time.",
"Would definitely recommend this great movie.",
"The story in this film is captivating.",
"I would see this movie again.",
"A good time watching this film.",
"Great performances make this movie memorable.",
"The film's plot was like no other.",
"Time well spent watching this great film.",
"This movie was really bad.",
"I wouldn't watch this film again.",
"Even though it's a film, I didn't like it.",
"The movie was one of the worst I've seen.",
"Bad acting ruined the film for me.",
"I really disliked this movie.",
"Would not recommend this film to anyone.",
"The plot was confusing and not good.",
"Even though I like movies, this one was terrible.",
"Not a good use of time watching this movie."
]
df_data_dummy = df_original[index_columns].copy()
st.write('In the following is the result of the data you have input : ')
print(df_data_dummy.head())
st.table(df_data_dummy)
if st.button(label='predict'):
# Melakukan prediksi data dummy
y_pred_inf = full_process.predict(df_data_dummy)
st.write('Client kemungkinan gagal bayar utang')
st.metric(label="Here is a prediction: ", value = y_pred_inf[0])
# Make predictions of IMDB dataset
predictions = loaded_lstm.predict(new_texts)
print('Predictions: ', predictions)
# Apply threshold for binary classification
threshold = 0.5
predicted_classes = (predictions > threshold).astype(int)
print('Predicted Classes: ', predicted_classes) |