Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,9 +42,13 @@ def initialize_agent(endpoint_uri: str):
|
|
| 42 |
)
|
| 43 |
|
| 44 |
def main():
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
-
if
|
| 48 |
# Initialize and run the agent
|
| 49 |
#agent = initialize_agent(endpoint_uri)
|
| 50 |
# Create an instance of the ContentAgentUI class
|
|
@@ -53,7 +57,5 @@ def main():
|
|
| 53 |
pass
|
| 54 |
|
| 55 |
if __name__ == "__main__":
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
os.system("grep -R 'markdownify' . || echo 'Not found'")
|
| 59 |
-
main()
|
|
|
|
| 42 |
)
|
| 43 |
|
| 44 |
def main():
|
| 45 |
+
uri = resolve_endpoint()
|
| 46 |
+
ok, msg = is_endpoint_healthy(uri)
|
| 47 |
+
if not ok:
|
| 48 |
+
return f"Endpoint not ready: {msg}"
|
| 49 |
+
|
| 50 |
|
| 51 |
+
if ok:
|
| 52 |
# Initialize and run the agent
|
| 53 |
#agent = initialize_agent(endpoint_uri)
|
| 54 |
# Create an instance of the ContentAgentUI class
|
|
|
|
| 57 |
pass
|
| 58 |
|
| 59 |
if __name__ == "__main__":
|
| 60 |
+
main()
|
| 61 |
+
|
|
|
|
|
|