Skip to content

Commit

Permalink
Change dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Wolf committed Aug 8, 2024
1 parent 36d7de8 commit 224665a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ def create_parser():

app.config["MODE"] = args.mode


# if model path is relative, make it absolute
if not os.path.isabs(app.config["MODEL_PATH"]):
app.config["MODEL_PATH"] = os.path.abspath(app.config["MODEL_PATH"])

# if server path is relative, make it absolute
if not os.path.isabs(app.config["SERVER_PATH"]):
app.config["SERVER_PATH"] = os.path.abspath(app.config["SERVER_PATH"])

print("Start Server on http://" + args.host + ":" + str(args.port))
if args.host == "0.0.0.0":
print("Please use http://localhost:" + str(args.port) + " to access the web app locally or the IP / hostname of your server to access the web app in your local network.")
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ surya-ocr
scikit-learn
prometheus_client
PyMuPDF
aiohttp
aiohttp
openpyxl
2 changes: 1 addition & 1 deletion webapp/llm_processing/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(self, config_file_path, model_path, *args, **kwargs):
self.model.choices = model_choices
if model_path:
self.model.validators = [FileExistsValidator(
message='File does not exist.', path=model_path)]
message='Model path does not exist.', path=model_path)]
# self.model.validators.append(FileExistsValidator(message='File does not exist.', path=model_path))
else:
raise ValueError("Model path is required")
Expand Down

0 comments on commit 224665a

Please sign in to comment.