Spaces:
Sleeping
Sleeping
Alexandre Gazola
commited on
Commit
·
aa5be48
1
Parent(s):
e0e987b
Merge branch 'main' of
Browse fileshttps://huggingface.co/spaces/agazo/AGAZO_Final_Assignment into main
app.py
CHANGED
|
@@ -4,6 +4,7 @@ import gradio as gr
|
|
| 4 |
import requests
|
| 5 |
import inspect
|
| 6 |
import pandas as pd
|
|
|
|
| 7 |
|
| 8 |
# --- LangChain Imports
|
| 9 |
import constants
|
|
@@ -52,6 +53,8 @@ class LangChainAgent:
|
|
| 52 |
|
| 53 |
def __call__(self, question: str) -> str:
|
| 54 |
print(f"LangChain agent received: {question[:50]}...")
|
|
|
|
|
|
|
| 55 |
result = self.executor.invoke({
|
| 56 |
"input": question,
|
| 57 |
"chat_history": []
|
|
|
|
| 4 |
import requests
|
| 5 |
import inspect
|
| 6 |
import pandas as pd
|
| 7 |
+
import time
|
| 8 |
|
| 9 |
# --- LangChain Imports
|
| 10 |
import constants
|
|
|
|
| 53 |
|
| 54 |
def __call__(self, question: str) -> str:
|
| 55 |
print(f"LangChain agent received: {question[:50]}...")
|
| 56 |
+
print("Waiting 60s before answering")
|
| 57 |
+
time.sleep(60) # Delay for 60 seconds
|
| 58 |
result = self.executor.invoke({
|
| 59 |
"input": question,
|
| 60 |
"chat_history": []
|