Coder Social home page Coder Social logo

jgurakuqi / ai-powered-web-library Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 73 KB

The goal here is to develop a simple mock web app book library for demonstrating a possible use of AI for aiding users

License: MIT License

JavaScript 58.71% HTML 16.77% CSS 17.22% Python 7.29%
bert-fine-tuning bert-model express-js machine-learning node-js pytorch transformers-models website xampp-server zero-shot-classification ai-powered-recommendations mysql

ai-powered-web-library's Introduction

ai-powered-web-library ๐Ÿš€

The goal here is to develop a simple mock web app book library for demonstrating a possible use of AI for aiding users. Currently the app is very minimal in terms of functionality, but the goal is to keep expanding it, including even more AI-based features to test their capabilities and integrability in such kind of application.

The currently included AI feature consists in a BERT classifier which will parse the books' reviews to determine the real review expressed by the user. This can turn really useful, as we have seen many times, in famous e-commerce shops, as people tend to give too much or too few stars with respect to their written review. This feature can normalise the single review by providing an amount of stars that matches the text content of the review, which then will be averaged with every AI-review, providing more reliable average reviews of a product.

Table of Contents

Requirements

Installation

  • Install XAMPP with MySQL and Apache, and configure Apache to listen on 0.0.0.0:80 with a server name like this 192.168.1.177:80, to make the web app accessible from external networks using this URL: http://YOUR_IPV4_ADDRESS/books/index.html. The JS files are configured to work with said IPV4 address, so you'll need to change them to run it on your machine.

  • Create Firewall or Router rules if needed to allow connections on the port 80. If you choose to use anothre port (e.g., 443).

  • Load all the files in the 'htdocs' folder of XAMPP to make them accessible.

  • Modify the MySQL config file to allow access as 'root', as currently no multi user is supported, and change the password to another one (considering that the used one is public on this repo).

  • Configure a MySQL database on XAMPP to include the tables:

    • books:
      • id: Auto-incremental primary key.
      • Title: varchar(50), not-null.
      • Author: varchar(100), not-null.
      • Year: smallint(4), not-null.
      • Price: float, not-null.
      • Description: varchar(700) -- Still to be used.
    • reviews:
      • id: Auto-incremental primary key.
      • Title: varchar(50), not-null.
      • Description: varchar(200), not-null.
      • Rating: tinyint(3), not-null.
      • Ai_rating: tinyint(3), not-null.
      • Book_id: Foreign-key pointed to book.id.
  • Perform a nodeJS init for the server.mjs to load the required libraries (core, express, ...).

Usage

  • XAMPP needs to be running, with the servies Apache and MySQL running.
  • The NodeJs module 'server.mjs' needs to be running:
node server.mjs
  • The page can be accessed at the URL described in the Installation section.

Contributing

Many improvements are possible:

  • Introduce the use of the Description field for the books.
  • Introduce the use of another LLM to summarize large books descriptions for interested users.
  • Introduce mult-user, and hence:
    • Make reviews user-related, meaning that each user can create just one review per each book.
    • Only admins should be able to insert new books.
    • Each user should have a profile page, to check all its related records.
  • Introduce purchasable books.
  • Introduce genre category for the books.
  • Introduce an AI Chatbot, which according to your history and preferences can advice to you some new books to buy.
  • Make the web app available for external networks (e.g., using ngrok).
  • Fix and/or improve the CSS styles. Currently the styles.css file for the book/index.html contain redundant and conflicting styling code, so a first task could be to refactor that file.

License

MIT License

Copyright (c) 2023 Jurgen Gurakuqi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ai-powered-web-library's People

Contributors

jgurakuqi avatar

Watchers

 avatar

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.