Spaces:
Runtime error
Download README.md from sameemul-haque/ktugpt: direct link, hf CLI and curl.
- Browser
- Download file 1.78 kB
-
https://huggingface.co/spaces/sameemul-haque/ktugpt/resolve/main/README.md
- Command line
-
hf download hf://spaces/sameemul-haque/ktugpt/README.md
-
curl -L -o README.md https://huggingface.co/spaces/sameemul-haque/ktugpt/resolve/main/README.md
A newer version of the Gradio SDK is available: 6.33.0
title: KTUGPT
emoji: 📚
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.28.3
app_file: app.py
pinned: false
license: mit
KTUGPT-Python
A Flask web application that is designed for answering questions based on the context from the PDFs. It uses the mistralai/Mistral-7B-Instruct-v0.1 model as the large language model (LLM) and the hkunlp/instructor-xl model for embedding text representations.
Setup
Clone this repository:
git clone https://github.com/sameemul-haque/KTUGPT-Python.gitAfter cloning the repository, navigate into the
KTUGPT-Pythondirectorycd KTUGPT-PythonSet up a Python virtual environment:
python -m venv venvActivate the virtual environment:
- GNU/Linux | MacOS:
source venv/bin/activate - Windows:
venv\Scripts\activate
- GNU/Linux | MacOS:
Install dependencies:
pip install -r requirements.txt
- Create a
.envfile based on.env.exampleand add your Hugging Face API token and MongoDB Connection String
Run the app:
python app.py
Usage
Once the Flask app is running, you can send POST requests to http://127.0.0.1:5000 with a query parameter q containing your question. The app will return an answer based on the configured language model and retrieval method. For example, http://127.0.0.1:5000/?q=what%20is%20operating%20system?
