isayahc commited on
Commit
9099563
2 Parent(s): 7ffbb8c 89a7695

Merge remote-tracking branch 'github/main'

Browse files
.github/workflows/pylint.yml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Pylint
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ python-version: ["3.8", "3.9", "3.10"]
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ - name: Set up Python ${{ matrix.python-version }}
14
+ uses: actions/setup-python@v3
15
+ with:
16
+ python-version: ${{ matrix.python-version }}
17
+ - name: Install dependencies
18
+ run: |
19
+ python -m pip install --upgrade pip
20
+ pip install pylint
21
+ - name: Analysing the code with pylint
22
+ run: |
23
+ pylint $(git ls-files '*.py')
.github/workflows/sync_2_hf.yml CHANGED
@@ -17,4 +17,6 @@ jobs:
17
  - name: Push to hub
18
  env:
19
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
- run: git push https://sabazo:$HF_TOKEN@huggingface.co/spaces/sabazo/docs-qachat-demo main
 
 
 
17
  - name: Push to hub
18
  env:
19
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
+ HF_USERNAME: ${{ secrets.HF_USERNAME }}
21
+ HF_SPACE_NAME: ${{ secrets.HF_SPACE_NAME }}
22
+ run: git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$HF_SPACE_NAME main
app.py CHANGED
@@ -37,7 +37,7 @@ def pdf_changes(pdf_doc):
37
 
38
  {context}
39
 
40
- Question: {question}
41
  Answer:"""
42
  PROMPT = PromptTemplate(
43
  template=prompt_template, input_variables=["context", "question"]
@@ -101,4 +101,4 @@ with gr.Blocks(css=css) as demo:
101
  bot, chatbot, chatbot
102
  )
103
 
104
- demo.launch()
 
37
 
38
  {context}
39
 
40
+ Question: {sample.question}
41
  Answer:"""
42
  PROMPT = PromptTemplate(
43
  template=prompt_template, input_variables=["context", "question"]
 
101
  bot, chatbot, chatbot
102
  )
103
 
104
+ demo.launch()