A-M-S commited on
Commit
cc8cfd2
1 Parent(s): 6d532c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -4,6 +4,9 @@ import pandas as pd
4
  import numpy as np
5
  import torch
6
 
 
 
 
7
  st.title("Movie Genre Predictor")
8
 
9
  st.subheader("Enter the text you'd like to analyze.")
@@ -23,8 +26,8 @@ if st.button("Predict"):
23
  utility = Utility()
24
  id2label, label2id, tokenizer, tokenized_plot = utility.tokenize(clean_plot, ["Action","Drama", "Romance", "Comedy", "Thriller"])
25
  st.write(tokenized_plot)
26
- xtrain_input_ids = [np.asarray(tokenized_plot['input_ids'])]
27
- xtrain_attention_mask = [np.asarray(tokenized_plot['attention_mask'])]
28
  st.write([np.asarray(tokenized_plot['input_ids'])])
29
  st.write(clean_plot)
30
 
 
4
  import numpy as np
5
  import torch
6
 
7
+ from preprocess import Preprocess
8
+ from utility import Utility
9
+
10
  st.title("Movie Genre Predictor")
11
 
12
  st.subheader("Enter the text you'd like to analyze.")
 
26
  utility = Utility()
27
  id2label, label2id, tokenizer, tokenized_plot = utility.tokenize(clean_plot, ["Action","Drama", "Romance", "Comedy", "Thriller"])
28
  st.write(tokenized_plot)
29
+ input_ids = [np.asarray(tokenized_plot['input_ids'])]
30
+ attention_mask = [np.asarray(tokenized_plot['attention_mask'])]
31
  st.write([np.asarray(tokenized_plot['input_ids'])])
32
  st.write(clean_plot)
33