Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AstraBert committed Jul 6, 2024
1 parent 7bf9a0b commit 1eed41a
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*/.cache
application/flagged
application/flagged
qdrant_storage/
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# qdurllm

**qdurllm** is a local search engine that lets you search through different URLs, retrieve and chat with their content, powered by Qdrant, Langchain, llama.cpp and Gradio.

## Quickstart

### Installation

```bash
git clone https://github.com/AstraBert/qdurllm.git
cd qdurllm
```

### Run it!

```bash
docker compose up -d
```

You'll find the application running at `http://localhost:7860` or `http://0.0.0.0:7860`

## Flowchart

![Flowchart](imgs/qdurllm.png)
8 changes: 3 additions & 5 deletions application/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
FROM python:3.10.14-slim-bookworm
FROM astrabert/local-search-application:latest

WORKDIR /app

ADD . /app/
RUN mkdir -p /app/scripts

RUN python3 -m pip cache purge
RUN python3 -m pip install --no-cache-dir -r requirements.txt
RUN python3 -m nltk.downloader all
ADD ./scripts/*.py /app/scripts/

EXPOSE 7860

Expand Down
2 changes: 1 addition & 1 deletion application/build_command.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
docker buildx build \
--label org.opencontainers.image.title=astrabert/local-search-application\
--label org.opencontainers.image.title=astrabert/local-search-application \
--label org.opencontainers.image.description='Local Search engine container' \
--label org.opencontainers.image.url=https://github.com/AstraBert/qdurllm \
--label org.opencontainers.image.source=https://github.com/AstraBert/qdurllm \
Expand Down
3 changes: 2 additions & 1 deletion application/scripts/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def reranked_rag(client, encoder0, encoder1, collection0, collection1, message):
demo0 = gr.Interface(fn=call_upload2qdrant, title="Upload URL content to Qdrant", inputs=gr.Textbox(label="URL(s)", info="Add one URL or more (if more, you should provide them comma-separated, like this: URL1,URL2,...,URLn)"), outputs=gr.Textbox(label="Logs"))

def llama_cpp_respond(query, max_new_tokens, temperature, repeat_penalty, seed):
url = "http://localhost:8000/completion"
url = "http://host.docker.internal:8000/completion"
headers = {
"Content-Type": "application/json"
}
Expand All @@ -65,6 +65,7 @@ def llama_cpp_respond(query, max_new_tokens, temperature, repeat_penalty, seed):
response = requests.post(url, headers=headers, json=data)

a = response.json()
print(a)
return a["content"]


Expand Down
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ services:
ports:
- "8000:8000"
networks:
- mynets
- mynet

Binary file added imgs/qdurllm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1eed41a

Please sign in to comment.