Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -70,10 +70,12 @@ def get_prediction(input_text, input_type):
|
|
70 |
is_url = input_type == "URL"
|
71 |
if is_url:
|
72 |
input_data = preprocess_input(input_text, url_tokenizer, preprocessing_params['max_url_length'])
|
|
|
73 |
else:
|
74 |
input_data = preprocess_input(input_text, html_tokenizer, preprocessing_params['max_html_length'])
|
|
|
75 |
|
76 |
-
prediction = model.predict(
|
77 |
return prediction
|
78 |
|
79 |
# Gradio UI
|
|
|
70 |
is_url = input_type == "URL"
|
71 |
if is_url:
|
72 |
input_data = preprocess_input(input_text, url_tokenizer, preprocessing_params['max_url_length'])
|
73 |
+
input_data = [input_data, np.zeros((1, preprocessing_params['max_html_length']))] # dummy HTML input
|
74 |
else:
|
75 |
input_data = preprocess_input(input_text, html_tokenizer, preprocessing_params['max_html_length'])
|
76 |
+
input_data = [np.zeros((1, preprocessing_params['max_url_length'])), input_data] # dummy URL input
|
77 |
|
78 |
+
prediction = model.predict(input_data)[0][0]
|
79 |
return prediction
|
80 |
|
81 |
# Gradio UI
|