Skip to content

1chooo/bear-bear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BearBear You

project badge Made with Python License

A brief summary of the project

Develop a Line BOT utilizing S3 and Amazon Recognition services to enhance familiarity with NCU Campus.

BearBear You LINE QRCODE

Enviroment:

With pip vertial environment

  • python request: 3.10
  • Required package: numpy flask line-bot-sdk face_recognition pandas boto3

For Linux/MacOS

$ pip3 install virtualenv
$ virtualenv venv --python=python3.10
$ source venv/bin/activate
$ pip install -r requirements.txt
$ deactivate
$ rm -rf venv     # remove the venv

For Windows

$ pip install virtualenv
$ virtualenv venv
$ venv\Scripts\activate
$ pip install -r requirements.txt
$ deactivate
$ rmdir /s venv     # remove the venv

Add LINE BOT Developer Config

You should duplicate the file config_example.py and rename into config.py

# line bot info
line_bot_api = 'your_line_bot_api'
handler = 'your_handler'

# AWS info
client_aws_access_key_id = "your_client_aws_access_key_id"
client_aws_secret_access_key = "your_client_aws_secret_access_key"
client_aws_session_token="your_client_aws_session_token"

# Model in AWS
model_arn="your_model_arn"

# AWS bucket info
client_bucket_name="your_client_bucket_name"
client_region_name="your_client_region_name"

With ngrok free server

$ brew install ngrok --cask
$ ngrok config add-authtoken YOUR_TOKEN
$ python run.py
$ ngrok http 5002

Start multiple tunnel

$ ngrok config check
Valid configuration file at YOUR_PATH/ngrok/ngrok.yml

Add the below code in YOUR_PATH/ngrok/ngrok.yml

version: "2"
authtoken: "YOUR_TOKEN"
# Please avoid making any changes to the content provided below
tunnels:
  first:
    addr: 5002
    proto: http    
  second:
    addr: 5012
    proto: http

type ngrok start --all in terminal to start ngrok

$ mkdocs build
$ mkdocs serve

Workflow permissions

  • Read and Write Permissions

Project Structure

PROJECT_ROOT
├── test/
│   ├── test_main.py/
│   ├──   :
│   └──   :
├── Bear/
│   ├── Drama.py
│   ├── Utils.py
│   └──   :
├── log/
│   ├── date/
│   └──   :
├── app.py
├── config.py
├── LICENSE
└── README.md

License

Released under MIT by @1chooo (Hugo ChunHo Lin)

This software can be modified and reused without restriction. The original license must be included with any copies of this software. If a significant portion of the source code is used, please provide a link back to this repository.