Spaces:
Sleeping
Sleeping
efraimdahl
commited on
Commit
·
2e9e425
1
Parent(s):
a2a7939
added setup clause
Browse files- Dockerfile +1 -1
- api/apitest.py +1 -3
- requirements.txt +2 -2
Dockerfile
CHANGED
@@ -9,5 +9,5 @@ COPY --chown=user ./requirements.txt requirements.txt
|
|
9 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
10 |
|
11 |
COPY --chown=user . /api
|
12 |
-
|
13 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
9 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
10 |
|
11 |
COPY --chown=user . /api
|
12 |
+
CMD ["python", "apitest.py"]
|
13 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
api/apitest.py
CHANGED
@@ -77,8 +77,6 @@ def queryTest(req):
|
|
77 |
assert("error" not in res4)
|
78 |
print("Passed image search suite")
|
79 |
|
80 |
-
print(res)
|
81 |
-
|
82 |
def completeTest(req):
|
83 |
scrapedData = scrapePage(req)
|
84 |
if("error" in scrapedData):
|
@@ -95,7 +93,7 @@ def completeTest(req):
|
|
95 |
|
96 |
|
97 |
if __name__ == '__main__':
|
98 |
-
|
99 |
print("starting error free requests")
|
100 |
for req in errorFreeReqs:
|
101 |
print("requesting", req["url"])
|
|
|
77 |
assert("error" not in res4)
|
78 |
print("Passed image search suite")
|
79 |
|
|
|
|
|
80 |
def completeTest(req):
|
81 |
scrapedData = scrapePage(req)
|
82 |
if("error" in scrapedData):
|
|
|
93 |
|
94 |
|
95 |
if __name__ == '__main__':
|
96 |
+
setup()
|
97 |
print("starting error free requests")
|
98 |
for req in errorFreeReqs:
|
99 |
print("requesting", req["url"])
|
requirements.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
|
2 |
spacy
|
3 |
-
|
4 |
fastapi
|
5 |
uvicorn
|
6 |
validators
|
|
|
1 |
+
beautifulsoup4
|
2 |
spacy
|
3 |
+
nltk
|
4 |
fastapi
|
5 |
uvicorn
|
6 |
validators
|