Skip to content

jiwonmik/SMILE-Question-Prompter

Repository files navigation

SMILE-Question-Prompter

In SMILE, the question prompter should check student's question if it includes all given keywords set by teachers or group leaders.

This is a server for 😊SMILE Question Prompter.

SMILE has been updated to version 3! Check it out!

You can test Prompter server using Spacy and OpenAI API with demo page.

📑 Table of Contents

Features

Enter keywords that should be included in the questions, and then enter your question. Then, check if your question is a valid one.

  • If you click ✅ check with spaCy, API will get similarity between every word from question sentence and keywords by its word-vector from spacy, and chekc if your question is a valid question.
  • If you click ✅ check with OpenAI, API will ask OpenAI model "gpt-3.5-turbo" if your question is a valid question.

Setup

Question Propmpter API

☝️ Requirements

spacy
fastapi
openai

✨ spaCy

💻 Settings

1. Install spaCy

See here for installing spaCy

conda create -n smile
conda activate smile
conda install -c conda-forge spacy

2. Download Trained Models for Korean and English

python -m spacy download en_core_web_lg
python -m spacy download ko_core_news_lg

Above two models are used like below.

nlp = spacy.load("en_core_web_lg")
konlp = spacy.load("ko_core_news_lg")

💻 How to use - development server

Activate conda environment you just created.

conda activate smile

Run the development server.

uvicorn main:app --reload

Question Propmpter Demo

You can check with Demo Page.

git clone https://github.com/jiwonmik/SMILE-Question-Prompter.git
npm install
npm run dev

Technologies

⚒️ Backend - Python, FastAPI, Nginx, spaCy, OpneAI API, Amazone Route 53, Gunicorn

🪄 Frontend - Vite + ReactJS, Typescript