Coder Social home page Coder Social logo

lxy-cool / intelligent_question_answering_v2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zilliz-bootcamp/intelligent_question_answering_v2

0.0 0.0 0.0 35 KB

This project combines the model provided by Bert and Milvus to realize a question and answer (QA) system.

Python 100.00%

intelligent_question_answering_v2's Introduction

❗❗ This repo will no longer be maintained, please visit https://github.com/milvus-io/bootcamp ❗ ❗

README

This project combines Milvus and the model provided by Bert to realize a question and answer system.This project aims to provide a solution to achieve semantic similarity matching with Milvus combined with various AI models.

Data description

The question-and-answer data set needed for this project is a csv file includes questions and answers.

The data set in the data directory is a sample data.

config description

QA/config.py:The script is a configuration file and needs to be modified for the specific environment.

Parameter Description Default setting
MILVUS_HOST milvus service ip 127.0.0.1
MILVUS_PORT milvus service port 19530
PG_HOST postgresql service ip 127.0.0.1
PG_PORT postgresql service port 5432
PG_USER postgresql user name postgres
PG_PASSWORD postgresql password postgres
PG_DATABASE postgresql datebase name postgres
DEFAULT_TABLE default table name milvus_qa
BERT_HOST Bert service ip 127.0.0.1
BERT_PORT Bert service port 5555
collection_param The parameters of collection
search_param The parameters of search {'nprobe': 32}
top_k The number of question 5

Steps to build a project

1.Install Milvus 0.10.4

2.Install PostgreSQL

3.Install the Python packages you need

pip install -r requriment.txt

4.Start the Bert services (more Bert related)

#Download model
$ cd model
$ wget https://storage.googleapis.com/bert_models/2018_11_03/english_L-12_H-768_A-12.zip
#start service
$ bert-serving-start -model_dir /model/english_L-12_H-768_A-12/ -num_worker=2 -max_seq_len=40

If you want to build a Q&A system in other languages, you can download the corresponding language model.

  1. Start the query service
uvicorn main:app --host 127.0.0.1 --port 8000
  1. Enter 127.0.0.1:8000/docs in the web page to view the interface provided by this project.

intelligent_question_answering_v2's People

Contributors

bennu-li avatar shiyu22 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.