Basu03 commited on
Commit
391c788
·
1 Parent(s): 6b117d3

vertex ai minor bugs 7

Browse files
Files changed (2) hide show
  1. .DS_Store +0 -0
  2. app.py +11 -1
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
app.py CHANGED
@@ -1,6 +1,8 @@
1
  import gradio as gr
2
  from src.graph import build_graph
3
- from src.interview_logic import EXCEL_QUESTIONS # Import questions for state building
 
 
4
 
5
  # Initialize the graph, which is stateless and operates on the state dict we provide.
6
  graph = build_graph()
@@ -128,4 +130,12 @@ with gr.Blocks(theme="soft", css=".gradio-container {max-width: 1200px; margin:
128
  )
129
 
130
  if __name__ == "__main__":
 
 
 
 
 
 
 
 
131
  demo.launch(debug=True, show_error=True)
 
1
  import gradio as gr
2
  from src.graph import build_graph
3
+ from src.interview_logic import EXCEL_QUESTIONS
4
+ from src.local_llm_handler import load_llm_pipeline
5
+ from src.perplexity_detector import load_detector_model # Import questions for state building
6
 
7
  # Initialize the graph, which is stateless and operates on the state dict we provide.
8
  graph = build_graph()
 
130
  )
131
 
132
  if __name__ == "__main__":
133
+ print("--- Pre-loading models on application startup... ---")
134
+ try:
135
+ load_llm_pipeline()
136
+ load_detector_model()
137
+ print("--- All models pre-loaded successfully. Starting Gradio server. ---")
138
+ except Exception as e:
139
+ print(f"--- FATAL ERROR: Could not pre-load models: {e} ---")
140
+
141
  demo.launch(debug=True, show_error=True)