yetessam commited on
Commit
037e937
·
verified ·
1 Parent(s): 6bf9c98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -42,9 +42,13 @@ def initialize_agent(endpoint_uri: str):
42
  )
43
 
44
  def main():
45
- endpoint_uri = run_status_checks()
 
 
 
 
46
 
47
- if endpoint_uri:
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
- print("Searching for 'markdownify' in repo...")
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
+