cevheri commited on
Commit
47fc572
·
1 Parent(s): aba6b7f

feat: HF and github integration

Browse files
Files changed (5) hide show
  1. .env.sample +1 -1
  2. .github/workflows/sync_with_hf.yml +33 -0
  3. Dockerfile +25 -0
  4. README.md +11 -0
  5. requirements.txt +0 -0
.env.sample CHANGED
@@ -5,7 +5,7 @@ DB_URL=
5
  DB_SCHEMA=
6
 
7
  # DB URL with root.crt for yugabyte
8
- # DB_URL="postgresql://username:password@us-east-1.14747abb-66a1-48eb-a85f-d434c56d612b.aws.yugabyte.cloud:5433/yugabyte?sslmode=verify-full&sslrootcert=root.crt"
9
 
10
  GEMINI_API_KEY=
11
  GEMINI_MODEL=
 
5
  DB_SCHEMA=
6
 
7
  # DB URL with root.crt for yugabyte
8
+ # DB_URL="postgresql://username:[email protected]:5433/yugabyte?sslmode=verify-full&sslrootcert=root.crt"
9
 
10
  GEMINI_API_KEY=
11
  GEMINI_MODEL=
.github/workflows/sync_with_hf.yml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face Hub
2
+
3
+ on:
4
+ push:
5
+ branches: [demo-tmp-memory] # ana branch'e push yapıldığında çalışacak
6
+
7
+ jobs:
8
+ sync-to-hub:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ with:
13
+ fetch-depth: 0
14
+ lfs: true
15
+
16
+ - name: Push to HF Space
17
+ env:
18
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
19
+ HF_ORGANIZATION: ${{ vars.HF_ORGANIZATION }}
20
+ HF_SPACE: ${{ vars.HF_SPACE }}
21
+ run: |
22
+ git config --global user.email "[email protected]"
23
+ git config --global user.name "GitHub Actions"
24
+ git remote add hf "https://api:[email protected]/spaces/$HF_ORGANIZATION/$HF_SPACE"
25
+ git fetch hf
26
+ git push hf main --force
27
+
28
+ # - name: Restart Space
29
+ # run: |
30
+ # curl -X POST \
31
+ # -H "Authorization: Bearer ${{ secrets.HF_TOKEN }}" \
32
+ # https://huggingface.co/api/spaces/${{ vars.HF_ORGANIZATION }}/${{ vars.HF_SPACE }}/restart
33
+
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11
2
+
3
+ RUN useradd -m -u 1000 chameleon
4
+
5
+ USER chameleon
6
+
7
+ ENV PATH="/home/chameleon/.local/bin:$PATH"
8
+
9
+ WORKDIR /app
10
+
11
+ COPY --chown=chameleon requirements.txt requirements.txt
12
+
13
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
+
15
+ COPY --chown=chameleon . .
16
+
17
+ # Hugging Face Space port
18
+ ENV PORT=7860
19
+
20
+ # Expose the port
21
+ EXPOSE 7860
22
+
23
+ # Start command for Hugging Face Space
24
+ # CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
25
+ CMD ["python", "gradio_app.py"]
README.md CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  # Natural Language SQL Query Agent with Visualization
2
 
3
  A smart and interactive PostgreSQL query system that translates natural language requests into SQL queries, executes them, and generates visualizations using PandasAI. Built with modern technologies including LangChain, FastMCP, and Gradio.
 
1
+ ---
2
+ title: Defect Solver API
3
+ emoji: 🤯
4
+ colorFrom: pink
5
+ colorTo: yellow
6
+ sdk: docker
7
+ pinned: false
8
+ short_description: Defect Solver - Bug Localization API
9
+ ---
10
+
11
+
12
  # Natural Language SQL Query Agent with Visualization
13
 
14
  A smart and interactive PostgreSQL query system that translates natural language requests into SQL queries, executes them, and generates visualizations using PandasAI. Built with modern technologies including LangChain, FastMCP, and Gradio.
requirements.txt CHANGED
Binary files a/requirements.txt and b/requirements.txt differ