Improve Gradio UI and fix arch_state bug (#227)

This commit is contained in:
Adil Hafeez 2024-10-29 11:27:13 -07:00 committed by GitHub
parent 662a840ac5
commit 60299244b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 209 additions and 262 deletions

View file

@ -186,8 +186,8 @@ async def hallucination(req: HallucinationRequest, res: Response):
start_time = time.perf_counter()
classifier = zero_shot_model["pipeline"]
if "arch_messages" in req.parameters:
req.parameters.pop("arch_messages")
if "messages" in req.parameters:
req.parameters.pop("messages")
candidate_labels = {f"{k} is {v}": k for k, v in req.parameters.items()}