phoenixarg commited on
Commit
0fd5509
·
verified ·
1 Parent(s): 6e5f027

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +74 -0
app.py ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # Paste the Markdown we wrote together here
4
+ BLOG_CONTENT = """
5
+ # From "Code Gen" to "Ops Gen": Meet FlowOS V2, the Flight Simulator for AI Data Engineers
6
+
7
+ ### The "Last Mile" Problem in Data Engineering
8
+ We’ve all seen it: you ask an LLM to "write a SQL query," and it does a decent job. But in the real world...
9
+
10
+ data engineering isn't just about writing a single query. It’s about the loop: understanding messy schemas, writing YAML pipelines, and—most importantly—fixing things when they inevitably break.
11
+
12
+ Most AI agents today are "armchair quarterbacks"—they can talk about the game, but they struggle to play it in a production environment. FlowOS V2 changes that by targeting the concrete capability gap between code generation and full production operations.
13
+
14
+ The Billion-Dollar "Maintenance Tax"
15
+ Why are we so obsessed with training agents to fix things? Because maintenance is the single biggest drain on modern engineering teams.
16
+
17
+ The 40% Tax: Data professionals spend a whopping 40% of their time simply evaluating or checking data quality. Research shows that 40-50% of a data engineer's total time is spent just "keeping the lights on" by fixing broken pipelines.
18
+
19
+ The Revenue Hit: This isn't just an engineering headache; poor data quality impacts 26% of company revenue.
20
+
21
+ The MTTR Crisis: It takes 75% of teams four or more hours just to detect a data quality incident, and an average of nine hours to resolve it once identified.
22
+
23
+ The Solution: Hours to Seconds
24
+ By automating the "Fixer" loop—interpreting logs and patching SQL—companies can reduce the "Mean Time to Repair" (MTTR) from nine hours to mere seconds. This offloads 1st-level support from expensive, high-end engineers, saving thousands of man-hours annually.
25
+
26
+ The Environment: A Data Engineer's Playground
27
+ FlowOS V2 isn't a toy; it’s a simulated workspace powered by OpenEnv and DuckDB.
28
+
29
+ What the Agent Sees: The agent receives a developer request, a workspace summary, and access to schemas and editable pipeline targets (YAML and SQL).
30
+
31
+ What the Agent Does: It can read_file, inspect_schema, edit_file, and run_validator to verify its work against a live runtime.
32
+
33
+ What Gets Rewarded: The agent is graded on investigation quality, artifact completeness, and—most importantly—runtime success and final schema correctness.
34
+
35
+ Explore the FlowOS V2 Space 🚀
36
+
37
+ Results: Trained vs. Untrained
38
+ Does simulator time actually work? Yes. We compared a base model against a policy trained via Supervised Fine-Tuning (SFT) and Reinforcement Learning (GRPO). The results were night and day:
39
+
40
+ Solved Rate: The trained policy significantly increased the rate of successful submissions.
41
+
42
+ Action Quality: We saw a massive reduction in "invalid actions" (hallucinated commands or infinite loops).
43
+
44
+ Investigation: Trained agents learned to read the runtime_contract.md before editing code, mirroring the behavior of a senior engineer.
45
+
46
+ It’s the difference between a student who has read a textbook and a pilot who has spent 100 hours in a flight simulator.
47
+
48
+ Why This Matters
49
+ Production AI agents will not succeed only by writing one perfect file. They must work in partially broken systems, preserve contracts under pressure, and coordinate across roles.
50
+
51
+ FlowOS V2 provides the first step toward a future where specialized Database, Deployment, and Incident agents collaborate to manage the world's data autonomously.
52
+
53
+ Get Involved
54
+ The code, training scripts, and environment are all open-source. Whether you're an AI researcher or a Data Engineer tired of the "9-hour fix," we’d love your feedback!
55
+
56
+ GitHub: [Link to Repo]
57
+
58
+ Hugging Face Space: praanjal-flowos-v2.hf.space
59
+
60
+ Video Demo: ADD_VIDEO_LINK_HERE
61
+
62
+ ---
63
+ *Built for the OpenEnv Hackathon by the FlowOS Team.*
64
+ """
65
+
66
+ with gr.Blocks(theme=gr.themes.Soft()) as demo:
67
+ with gr.Column(scale=1, min_width=600): # This centers the text and keeps it readable
68
+ gr.Markdown(BLOG_CONTENT)
69
+
70
+ # Optional: Add a button to your main repo or Space
71
+ gr.HTML("<br>")
72
+ gr.Button("Try the Simulator 🚀", link="https://praanjal-flowos-v2.hf.space")
73
+
74
+ demo.launch()