Skip to content
Snippets Groups Projects
Commit 8226548c authored by Grießhaber Daniel's avatar Grießhaber Daniel :squid:
Browse files

fix reverse proxy serving during debug

parent e7ccb8aa
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,11 @@ if DEBUG:
headers=request.headers,
stream=True,
)
return Response(content=response.content, status_code=response.status_code)
return Response(
content=response.raw.read(),
status_code=response.status_code,
headers=dict(response.headers.items()),
)
else:
app.mount("/", StaticFiles(directory="frontend/build/", html=True), name="frontend")
......@@ -9,8 +9,8 @@ from task import SentimentAnalysis
# global optimizer
# optimizer = Optimizer(debug=DEBUG)
_evolution_model: LLMModel = None
_evaluation_model: LLMModel = None
_evolution_model: LLMModel | None = None
_evaluation_model: LLMModel | None = None
# _model_call_type: get_type_hints(LLMModel).get("__call__")
......@@ -82,10 +82,7 @@ class MultiProcessOptimizer:
# currently fix task
options = Namespace(use_grammar=False, debug=self.debug)
task = SentimentAnalysis(
evaluation_model,
options
)
task = SentimentAnalysis(evaluation_model, options)
optimizer_class = GeneticAlgorithm
# optimizer_class = DifferentialEvolution
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment