ritikjain51 commited on
Commit
2541f56
1 Parent(s): 891c78b

Added github trigger and dockerfile

Browse files
Files changed (6) hide show
  1. .gitignore +2 -0
  2. .idea/workspace.xml +6 -2
  3. Dockerfile +0 -19
  4. __init__.py +0 -0
  5. app.py +3 -2
  6. qna.py +0 -0
.gitignore CHANGED
@@ -2,3 +2,5 @@
2
  .chroma
3
  *.ipynb
4
  *.pyc
 
 
 
2
  .chroma
3
  *.ipynb
4
  *.pyc
5
+ __pycache__
6
+ .faiss
.idea/workspace.xml CHANGED
@@ -5,9 +5,12 @@
5
  </component>
6
  <component name="ChangeListManager">
7
  <list default="true" id="0a0418d0-6088-4caa-978a-8b080189aca4" name="Changes" comment="Added github trigger and dockerfile">
8
- <change beforePath="$PROJECT_DIR$/Dockerfile" beforeDir="false" afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
 
 
10
  <change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
 
11
  </list>
12
  <option name="SHOW_DIALOG" value="false" />
13
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -24,6 +27,7 @@
24
  <option name="stateVersion" value="1" />
25
  </component>
26
  <component name="ProjectId" id="2QancmVAIdhlM2wWI90Bccg2Z3W" />
 
27
  <component name="ProjectViewState">
28
  <option name="hideEmptyMiddlePackages" value="true" />
29
  <option name="showLibraryContents" value="true" />
 
5
  </component>
6
  <component name="ChangeListManager">
7
  <list default="true" id="0a0418d0-6088-4caa-978a-8b080189aca4" name="Changes" comment="Added github trigger and dockerfile">
8
+ <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/Dockerfile" beforeDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/__init__.py" beforeDir="false" />
12
  <change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
13
+ <change beforePath="$PROJECT_DIR$/qna.py" beforeDir="false" />
14
  </list>
15
  <option name="SHOW_DIALOG" value="false" />
16
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
 
27
  <option name="stateVersion" value="1" />
28
  </component>
29
  <component name="ProjectId" id="2QancmVAIdhlM2wWI90Bccg2Z3W" />
30
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
31
  <component name="ProjectViewState">
32
  <option name="hideEmptyMiddlePackages" value="true" />
33
  <option name="showLibraryContents" value="true" />
Dockerfile DELETED
@@ -1,19 +0,0 @@
1
- FROM python:3.10-slim
2
-
3
- WORKDIR /code
4
-
5
- ENV PYTHONUNBUFFERED=1 \
6
- PYTHONDONTWRITEBYTECODE=1 \
7
- PIP_NO_CACHE_DIR=off \
8
- PIP_DISABLE_PIP_VERSION_CHECK=on \
9
- PIP_DEFAULT_TIMEOUT=100 \
10
- HNSWLIB_NO_NATIVE=1
11
-
12
- RUN apt-get update && apt install python3-dev libprotobuf-dev build-essential -y
13
-
14
- COPY . .
15
- RUN pip install --upgrade pip
16
- RUN pip install duckdb
17
- RUN pip install -r requirements.txt
18
- EXPOSE 8071
19
- CMD ["gradio", "app.py"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
__init__.py DELETED
File without changes
app.py CHANGED
@@ -77,12 +77,13 @@ with gr.Blocks() as demo:
77
  value="NA"
78
  )
79
  with gr.Column(visible=False) as openai_config:
80
- api_key = gr.Textbox(value="", label="OPENAI API KEY", placeholder="sk-...", visible=True, interactive=True)
 
81
 
82
  with gr.Column(visible=False) as huggy_config:
83
  hug_model = gr.Dropdown(["google/flan-t5-xl"],
84
  value="google/flan-t5-xl", multiselect=False)
85
- hug_token = gr.Textbox(value="", placeholder="hf-...", interactive=True)
86
 
87
  with gr.Accordion("Advance Settings", open=False, visible=False) as advance_settings:
88
  temperature = gr.Slider(0, 1, label="Temperature")
 
77
  value="NA"
78
  )
79
  with gr.Column(visible=False) as openai_config:
80
+ api_key = gr.Textbox(value="", label="OPENAI API KEY", placeholder="sk-...", visible=True, interactive=True,
81
+ type="password")
82
 
83
  with gr.Column(visible=False) as huggy_config:
84
  hug_model = gr.Dropdown(["google/flan-t5-xl"],
85
  value="google/flan-t5-xl", multiselect=False)
86
+ hug_token = gr.Textbox(value="", placeholder="hf_...", interactive=True, type="password")
87
 
88
  with gr.Accordion("Advance Settings", open=False, visible=False) as advance_settings:
89
  temperature = gr.Slider(0, 1, label="Temperature")
qna.py DELETED
File without changes