mimChat is a Django / Vue
project that aims to create a simple chat interface. In the backend we use django and you can put there any pretrained model to receive the response and get it displayed in the interface. mim by the way stands for Made in Morocco
- Easy to use.
- The ability to save, edit, and delete rooms.
- The possibility of using your own model in the backend.
To get started with this project, follow these steps:
- Clone the repository:
git clone https://github.com/ImadSaddik/chatInterface.git
- Install the required dependencies:
pip install -r requirements.txt
, the file is insidechat_app_django
- Go to
chat_app_vue
and run:npm install
- Go to
chat_app_django
and run:python manage.py migrate
&python manage.py runserver
- Go to
chat_app_vue
and run:npm run serve
You need to go to the file located in chat_app_django/chatbot/views.py
and import your model there. After importing the model delete this line of code response = responses[random.randint(0, len(responses) - 1)]
and use your model instead to get the response.
@api_view(['POST'])
def chat(request):
global responses
prompt = json.loads(request.body)['prompt']
# if we have access to a pretrained model, we can feed the prompt into the model and get a response
response = responses[random.randint(0, len(responses) - 1)]
return JsonResponse({'response': response})