Spaces:
Running on Zero

nitish17855 commited on
Commit
18290ab
·
1 Parent(s): 7e7820a

Expose visible Gradio components to prevent ZeroGPU graph pruning

Browse files
Files changed (1) hide show
  1. app.py +16 -9
app.py CHANGED
@@ -29,18 +29,25 @@ from api.main import app
29
 
30
  @spaces.GPU
31
  def predict(query: str):
32
- return f"AURA CRAG ZeroGPU Engine Active. Query: {query}"
33
 
34
  with gr.Blocks(title="AURA CRAG — Enterprise Financial Intelligence", fill_width=True) as demo:
35
- # Components registered for ZeroGPU scanner
36
- _txt_in = gr.Textbox(visible=False)
37
- _txt_out = gr.Textbox(visible=False)
38
- _btn = gr.Button("Query", visible=False)
39
- _btn.click(fn=predict, inputs=_txt_in, outputs=_txt_out)
40
-
41
- # Embed our custom luxury Glass-Box Studio UI
 
 
 
 
 
 
 
42
  gr.HTML(
43
- '<iframe src="/studio" style="width:100%; height:94vh; border:none; border-radius:12px; box-shadow: 0 4px 20px rgba(0,0,0,0.5);"></iframe>'
44
  )
45
 
46
  # Mount Gradio at root '/' so Hugging Face ZeroGPU probe detects it directly!
 
29
 
30
  @spaces.GPU
31
  def predict(query: str):
32
+ return f"⚡ AURA CRAG ZeroGPU Engine Active. Received: {query}"
33
 
34
  with gr.Blocks(title="AURA CRAG — Enterprise Financial Intelligence", fill_width=True) as demo:
35
+ gr.Markdown("# ⚡ AURA CRAG — Enterprise Financial Intelligence & Glass-Box Studio")
36
+ with gr.Row():
37
+ query_input = gr.Textbox(
38
+ label="ZeroGPU Quick Query",
39
+ placeholder="e.g. What was Apple's total revenue in FY 2025?",
40
+ scale=4
41
+ )
42
+ submit_btn = gr.Button("Analyze via GPU", variant="primary", scale=1)
43
+
44
+ status_output = gr.Textbox(label="Engine Status", interactive=False)
45
+ submit_btn.click(fn=predict, inputs=query_input, outputs=status_output)
46
+
47
+ gr.Markdown("---")
48
+ gr.Markdown("### 🏛️ Interactive Glass-Box Studio (Live SEC 10-K Pipeline)")
49
  gr.HTML(
50
+ '<iframe src="/studio" style="width:100%; height:880px; border:none; border-radius:12px; box-shadow: 0 4px 25px rgba(0,0,0,0.4);"></iframe>'
51
  )
52
 
53
  # Mount Gradio at root '/' so Hugging Face ZeroGPU probe detects it directly!