AndySAnker commited on
Commit
739f128
1 Parent(s): 066ac37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -20
app.py CHANGED
@@ -109,26 +109,19 @@ args.Qdamp = Qdamp
109
  args.file_name = "POMFinder_results.txt"
110
 
111
  if pdf_file is None:
112
- st.warning("Please upload a PDF file.")
113
- else:
114
- # Get the contents of the file as bytes
115
- file_bytes = pdf_file.read()
116
-
117
- # Save the contents of the file to disk
118
- with open("uploaded_file.gr", "wb") as f:
119
- f.write(file_bytes)
120
-
121
- #Predict with POMFinder
122
- y, y_onehotenc_cat, y_onehotenc_values, POMFinder = get_POMFinder()
123
- r, Gr = PDF_Preparation(args.data, args.Qmin, args.Qmax, args.Qdamp, rmax=10, nyquist=args.nyquist)
124
- res, y_pred_proba = POMPredicter(POMFinder, Gr, y_onehotenc_cat);
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
 
133
 
134
  st.subheader('Cite')
 
109
  args.file_name = "POMFinder_results.txt"
110
 
111
  if pdf_file is None:
112
+ st.warning("Please upload a PDF file.")
113
+ else:
114
+ # Get the contents of the file as bytes
115
+ file_bytes = pdf_file.read()
116
+
117
+ # Save the contents of the file to disk
118
+ with open("uploaded_file.gr", "wb") as f:
119
+ f.write(file_bytes)
120
+
121
+ #Predict with POMFinder
122
+ y, y_onehotenc_cat, y_onehotenc_values, POMFinder = get_POMFinder()
123
+ r, Gr = PDF_Preparation(args.data, args.Qmin, args.Qmax, args.Qdamp, rmax=10, nyquist=args.nyquist)
124
+ res, y_pred_proba = POMPredicter(POMFinder, Gr, y_onehotenc_cat);
 
 
 
 
 
 
 
125
 
126
 
127
  st.subheader('Cite')