Skip to content

Commit

Permalink
updare
Browse files Browse the repository at this point in the history
  • Loading branch information
Zochory committed Sep 1, 2024
1 parent ac4ed6d commit e08de11
Show file tree
Hide file tree
Showing 66 changed files with 233,403 additions and 380,413 deletions.
38 changes: 6 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,21 @@ python/*/lib/
.coverage
coverage/
licenses.txt
notebooks/*/lancedb
notebooks/*/data
examples_notebooks/*/lancedb
examples_notebooks/*/data
tests/fixtures/cache
tests/fixtures/*/cache
tests/fixtures/*/output
lancedb/
graphfleet/cache
graphfleet/output/20240828-113421
graphfleet/output/20240828-113421/reports

# Random
.DS_Store
*.log*
.venv
venv/
.conda
.tmp
.genaiscript


.env
build.zip
Expand All @@ -56,7 +55,7 @@ build.zip
__pycache__

.pipeline
.genaiscript

# Azurite
temp_azurite/
__azurite*.json
Expand All @@ -68,28 +67,3 @@ ragtest/
.ragtest/
.pipelines
.pipeline

# Large files
*.zip
*.tar.gz
*.7z
*.rar
*.iso
*.dmg
*.pkg
*.exe
*.deb
*.rpm

# Data and model files
*.csv
*.tsv
*.json
*.pkl
*.h5
*.pb

# Directories
data/
models/
logs/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Jupyter Notebooks: Explore GraphFleet's capabilities with the provided notebooks
To run the API, save the code in a file named api.py and execute the following command in your terminal:

``` bash
## uvicorn app:main --reload --port 8001
uvicorn app:main --reload --port 8001
```

### Run the CLI commands to query the graph (Follow the get-started-graphfleet.ipynb notebook)
Expand Down
9 changes: 9 additions & 0 deletions app/.streamlit/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[theme]
base="light"
primaryColor="#2b2b2b"

[server]
port = 8501
address = "0.0.0.0"

[settings]
20 changes: 20 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3.11.5-slim

WORKDIR /app

RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/Qredence/GraphFleet.git .

RUN pip3 install -r requirements.txt

EXPOSE 8501

HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
Empty file added app/__init__.py
Empty file.
12 changes: 8 additions & 4 deletions app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@

class Settings(BaseSettings):
API_KEY: str = os.getenv("GRAPHRAG_API_KEY", "default_api_key")
LLM_MODEL: str = os.getenv("GRAPHRAG_LLM_MODEL", "default_llm_model")
EMBEDDING_MODEL: str = os.getenv("GRAPHRAG_EMBEDDING_MODEL", "default_embedding_model")
LLM_MODEL: str = os.getenv("GRAPHRAG_LLM_MODEL", "gpt-4o-mini")
EMBEDDING_MODEL: str = os.getenv("GRAPHRAG_EMBEDDING_MODEL", "text-embedding-3-large")
API_BASE: str = os.getenv("GRAPHRAG_API_BASE", "default_api_base")
API_VERSION: str = os.getenv("GRAPHRAG_API_VERSION", "default_api_version")
INPUT_DIR: str = os.getenv("GRAPHRAG_INPUT_DIR", "graphfleet/output/20240829-184001/artifacts")
LANCEDB_URI: str = os.getenv("GRAPHRAG_LANCEDB_URI", "graphfleet/output/20240829-184001/artifacts/lancedb")
INPUT_DIR: str = os.getenv(
"GRAPHRAG_INPUT_DIR", "graphfleet/output/20240901-044131/artifacts"
)
LANCEDB_URI: str = os.getenv(
"GRAPHRAG_LANCEDB_URI", "graphfleet/output/20240901-044131/artifacts/lancedb"
)
COMMUNITY_LEVEL: int = int(os.getenv("GRAPHRAG_COMMUNITY_LEVEL", 2))
MAX_TOKENS: int = int(os.getenv("GRAPHRAG_MAX_TOKENS", 12000))

Expand Down
5 changes: 4 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from fastapi import FastAPI, HTTPException
from fastapi.responses import StreamingResponse
from pydantic import BaseModel
from pydantic_settings import BaseSettings, SettingsConfigDict # Updated import
from app.services.question_generator import create_question_generator
from app.services.search_engine import create_search_engines, LocalSearchWrapper, GlobalSearchWrapper
from app.routers import search
Expand Down Expand Up @@ -117,4 +118,6 @@ async def generate_questions(search_query: SearchQuery):

@app.get("/")
async def root():
return {"message": "Welcome to GraphFleet API"}
return {"message": "Welcome to GraphFleet API"}

main = app
43 changes: 0 additions & 43 deletions azure-pipelines.yml

This file was deleted.

Loading

0 comments on commit e08de11

Please sign in to comment.