Giter Site home page Giter Site logo

idrak_ai_task's Introduction

idrak_ai_task

This repo contains the task assign by idark ai. You can access the notebook from colab https://colab.research.google.com/drive/1r49W2dayUfltp7zQx1_4qY602IyLNn4F?usp=sharing or you can run locally idrak_ai_tasks (1).ipynb . The notebooks or python files contains all the details/documents and helps in comments and docs strings. Altough here we are sharing a brief details.

  1. The question/answers text file will be process first. Empty and duplicate rows will be removed. Questions will be cleaned from unwanted symbols. ProcessQuestionDB class will be used for this purpose.
data_processor=ProcessQuestionsDB(input_df_path='S08_question_answer_pairs.txt',\
                output_df_path='idrak_ai_qa_pairs.csv',seprator='\t',question_col='Question',\
               answer_col='Answer')
  1. Features will be extracted using FeaturesDBGenerator class
features_db_generator=FeaturesDBGenerator(dataset_path='idrak_ai_qa_pairs.csv',extractor_model_weight_path='FE.pt',output_db_path='qa_db.json')
  1. Query Object will be initialize that contain user query. And Answer to this object will assign by QuestionReterival system.
query=Query('When did Political career of lincoln start?') #defining a query object
  1. QuestionReterival class is responisble for reading features database,extract features from query question. And then match query features with database using cosine similarity.
qr=QuestionReterival(features_db_path='qa_db.json')
  1. Searching the query answer.
qr.search_question(query)
  1. Displaying the answer
query.get_answer()
query.get_similar_question()

or

print(query)

You can use gui_aap.py

Ussage:

Idraak_Tutorial.mp4 this video contains all the process

(Step 1) activate virtual envoirnment

(Step 2) Installing require modules

pip install -r requirements.txt

(Step 3) To extract features

python extract_feature.py

Expected output

--- Extracting Features ---
--- Features Extracted ---
--- Features are Stored to qa_db.json ---
--- Model is saved to FE.pt ---

(Step 4) Inference

For inference we made a GUI based application. This application is developed in Flat. Flat is a python based module , which create flutter like applications.

python gui_app.py

It will run a flutter based application in which you will pass the question and it give us answers.

Screenshot

Thanks

idrak_ai_task's People

Contributors

m-aliabbas 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.