Update app.py
Browse files
app.py
CHANGED
|
@@ -81,9 +81,10 @@ agent = ToolCallingAgent(tools=[retriever_tool], model=HfApiModel(model))
|
|
| 81 |
def respond(message, history: list[tuple[str, str]], system_message, max_tokens, temperature, top_p, score,):
|
| 82 |
|
| 83 |
print(datetime.now())
|
| 84 |
-
print(message)
|
| 85 |
context = retriever_tool(message)
|
| 86 |
|
|
|
|
|
|
|
| 87 |
is_law = client.text_generation(f"""Given the user question below, classify it as either being about "Law" or "Other".
|
| 88 |
Do NOT respond with more than one word.
|
| 89 |
Question:
|
|
@@ -156,5 +157,5 @@ demo = gr.ChatInterface(
|
|
| 156 |
|
| 157 |
|
| 158 |
if __name__ == "__main__":
|
|
|
|
| 159 |
demo.launch(debug=True)
|
| 160 |
-
print("Ready!")
|
|
|
|
| 81 |
def respond(message, history: list[tuple[str, str]], system_message, max_tokens, temperature, top_p, score,):
|
| 82 |
|
| 83 |
print(datetime.now())
|
|
|
|
| 84 |
context = retriever_tool(message)
|
| 85 |
|
| 86 |
+
print(message)
|
| 87 |
+
|
| 88 |
is_law = client.text_generation(f"""Given the user question below, classify it as either being about "Law" or "Other".
|
| 89 |
Do NOT respond with more than one word.
|
| 90 |
Question:
|
|
|
|
| 157 |
|
| 158 |
|
| 159 |
if __name__ == "__main__":
|
| 160 |
+
print("Ready!")
|
| 161 |
demo.launch(debug=True)
|
|
|