Giter Club home page Giter Club logo

spam-detection-project's People

Watchers

 avatar  avatar

spam-detection-project's Issues

Renaming the folder of saved_model.pb to something appropriate

Overview

Renaming the folder of saved_model.pb for both rnn-mail and rnn-sms folder to something appropriate (for example, cpu_rnn_mail and cpu_rnn_sms respectively). Relative to this, files using the model should also have its file path changed. The issue is raised by @devbcdestiller.

Actual output

The name of both folders for the saved models are rnn-mail and rnn-sms, which can lead to confusion, as noted by @devbcdestiller.

Expected output

The name of both folders for the models should be something appropriate, (for example, cpu_rnn_mail and cpu_rnn_sms) with respect to the input they're trained with. The files that also use the saved models (i.e., importing the model to the file) should also have its file path changed for it to reflect properly.

Operand should contain 1 column(s)

Full error
Traceback (most recent call last): File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 2091, in __call__ return self.wsgi_app(environ, start_response) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 2076, in wsgi_app response = self.handle_exception(e) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app response = self.full_dispatch_request() File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/home/minty/projects/Web Apps/spam-detection-project/Web App/SpamDetect/routes.py", line 35, in result_page resultObj = getSMSResult(content) File "/home/minty/projects/Web Apps/spam-detection-project/Web App/SpamDetect/machinelearning.py", line 34, in getSMSResult cursor.execute(''' INSERT INTO resultxpam (type, content, result, spampercent) VALUES(%s,%s,%s,%s)''',('SMS',content, result, spamPercent)) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute res = self._query(query) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query db.query(q) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query _mysql.connection.query(self, query) MySQLdb._exceptions.OperationalError: (1241, 'Operand should contain 1 column(s)')

Maybe an issue on querying the result.

Detekt app is too big for Heroku

Overview

  • Heroku only accepts 500M memory for an application, it rejected its latest deploy of detekt app because the app is too big for the platform.
  • There is also a problem upon installing the nltk module in heroku deployment, "nltk.txt" is not found while installing the module.

Actual Output

  • The last deployment of the application is 479.9M, the additional modules (nltk and sklearn) apparently exceeded the available memory for the application.
    image

Expected Output

  • The deployment shall be successful and the memory requirement for the application in heroku must be met.

Non-working email prediction model

(1) Steps to Replicate

  • Submit Email type message with content of "Subject: New jobs similar to Information Technology Intern at foodpanda"

(2) Expected Output

  • Result: Spam

(3) Actual Output

Content: Subject: New jobs similar to Information Technology Intern at foodpanda
Percent: 32.874804735183716
Result: Ham

image

Data too long for column 'content' at row 1

Steps to Replicate

  • Input text with length larger than 2168

Expected Output

  • SQL query should be successful and display the content on the front-end.

Actual Output

  • Website returns error 500.
  • Traceback:
    Content Length: 2168 127.0.0.1 - - [20/Mar/2022 20:22:35] "POST /results HTTP/1.1" 500 - Traceback (most recent call last): File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 2091, in __call__ return self.wsgi_app(environ, start_response) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 2076, in wsgi_app response = self.handle_exception(e) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app response = self.full_dispatch_request() File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask_cors/extension.py", line 165, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/home/minty/projects/Web Apps/spam-detection-project/Web App/SpamDetect/routes.py", line 26, in result_page cursor.execute(''' INSERT INTO xpam (type, content) VALUES(%s,%s)''',(type,content)) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute res = self._query(query) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query db.query(q) File "/home/minty/anaconda3/envs/TFEnv/lib/python3.8/site-packages/MySQLdb/connections.py", line 254, in query _mysql.connection.query(self, query) MySQLdb._exceptions.DataError: (1406, "Data too long for column 'content' at row 1")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.