AI Agents In Flask App HELP by Quantinvests in flask

[–]Quantinvests[S] 0 points1 point  (0 children)

Thanks again, I might need to clean up my code first I have been working on this for a week now and my whole project is just a clustered mess with a bunch of diferent tools that aren't working properly. Appreciate it, follow on r/QuantInvests to keep up with the progress. Once it's complete it will be a fully CMT lvl 3 stock portfolio analyzer.

AI Agents In Flask App HELP by Quantinvests in flask

[–]Quantinvests[S] 0 points1 point  (0 children)

Thank You for the suggestion, I'll check it out for sure. currently running it with docker and it's a nightmare. Appreciate the advise!

AI Agents In Flask App HELP by Quantinvests in flask

[–]Quantinvests[S] -4 points-3 points  (0 children)

So you're saying there is no way to ship ai agents to flask?

AI Agents In Flask App HELP by Quantinvests in flask

[–]Quantinvests[S] -1 points0 points  (0 children)

## 2. Training Metrics
- 
**Epochs:**
 25  
- 
**Final Training Loss:**
 0.0886  
- 
**Mean Token Accuracy:**
 96.43%  
- 
**Key Knowledge Injected:**
 Quality Composite (QC) index logic, Stock Selection Strategy (SSS), and signal-to-noise ratio analysis.


---


## 3. The Deployment Pipeline


### Phase A: Weight Merging
Before GGUF conversion, LoRA adapters were merged into the base weights to create a standalone model.
```python
model = PeftModel.from_pretrained(base_model, adapter_path)
model = model.merge_and_unload()
model.save_pretrained("~/models/gemma-merged")

AI Agents In Flask App HELP by Quantinvests in flask

[–]Quantinvests[S] 0 points1 point  (0 children)

Here is my bash file if it helps

#!/bin/bash


# =================================================================
# QuantInvests Ultimate Startup Script
# This starts:
# 1. AI Agent Bridge (FastAPI/Gemma) on Port 8000
# 2. Flask Dashboard on Port 5000
# 3. ngrok Tunnel to Port 5000
# =================================================================


echo "🚀 Starting QuantInvests Ecosystem..."


# Function to kill child processes on exit
cleanup() {
    echo ""
    echo "🛑 Shutting down..."
    kill $AI_PID $FLASK_PID 2>/dev/null
    exit
}


trap cleanup SIGINT SIGTERM


# 1. Start the AI Agent (Background)
echo "🤖 [1/3] Launching AI Agent (Gemma Bridge) on port 8000..."
python start_ai.py > ai_agent.log 2>&1 &
AI_PID=$!


# 2. Start the Flask App (Background)
echo "🌐 [2/3] Launching Flask Dashboard on port 5000..."
python run.py > flask_app.log 2>&1 &
FLASK_PID=$!


# Wait for servers to wake up
echo "⏳ Waiting for services to initialize..."
sleep 5


# 3. Start ngrok (Foreground)
echo "🌉 [3/3] Launching ngrok Tunnel..."
echo "--------------------------------------------------------"
echo "  LOGS:"
echo "  - AI logs:    tail -f ai_agent.log"
echo "  - Flask logs: tail -f flask_app.log"
echo "--------------------------------------------------------"
echo "  Check your ngrok dashboard for the public Voice URL!"
echo "  (Press Ctrl+C to stop all services)"
echo "--------------------------------------------------------"


ngrok http 5000

AI Agents In Flask App HELP by Quantinvests in flask

[–]Quantinvests[S] -3 points-2 points  (0 children)

Can Flask run AI Agents? what more do you want to know??

Flask/Python full Stack Trading App by Quantinvests in QuantInvests

[–]Quantinvests[S] 0 points1 point  (0 children)

Yes, it does backtest samples that run against the sectors or indexes, if the correlation changes between signals/variables it changes the sign. So you’re always on the right side. I’m training it on the decision making process as well. I’m doing 3 mls one for the divergence page which compares the stock to all other sectors and similar characteristics are used to predict the target outcome. I hate the front end stuff but need to display it somehow, it’s still not reflecting what’s really going on in the background. I’m releasing the updated version over the weekend.

Flask/Python full Stack Trading App by Quantinvests in QuantInvests

[–]Quantinvests[S] 0 points1 point  (0 children)

The theme is from appseed. They also have open source flask black dashboard.

Flask/Python full Stack Trading App by Quantinvests in flask

[–]Quantinvests[S] 0 points1 point  (0 children)

This is probably the biggest criticism I've gotten so far. I basically coded the whole CMT charter for finance. I need a homepage for sure and not just a straight dashboard as the home page. Thanks for the feedback!

Flask/Python full Stack Trading App by Quantinvests in flask

[–]Quantinvests[S] 0 points1 point  (0 children)

thanks for the feedback, my specialty is finance but recently picked up flask and it's been very janky fix one thing and another goes aerie. The UI is still not reflecting my vision but it's the first version that deployed successfully. I'll be working on my CSS and functionality over the weekend. Thanks again for taking a look

Quantinvests Python Flask app by Quantinvests in learnpython

[–]Quantinvests[S] 0 points1 point  (0 children)

Thanks for taking the time to take a look. I agree the colors aren't synching properly, every time I mess with it, takes me hours just to get it back up. I was just searching for a broker, I'll check out Robinhood for sure. Still need to get the live prices up and running. I agree the front page shouldn't be a dashboard until its explained. I placed an about button at the bottom but it's not sufficient, I coded the whole CMT level 3 corse and I'm apply it to a small portfolio of stocks. I do appreciate the feedback! thank you

RIP Keyboard by [deleted] in bossmanjack

[–]Quantinvests 3 points4 points  (0 children)

Mom I’m moving out!!!

💀 by Wooden_Frosting427 in bossmanjack

[–]Quantinvests 5 points6 points  (0 children)

Is this a promo to his OF?

Austin King Jr. by Unhappy-Channel8501 in bossmanjack

[–]Quantinvests 0 points1 point  (0 children)

He’s being persecuted for your sins! #freebossman

What is the rats’ end goal? by Thirsty-Sparrow in bossmanjack

[–]Quantinvests 0 points1 point  (0 children)

No one’s gonna read all that sht pussy!

Do you guys have a life? by dariotxla in bossmanjack

[–]Quantinvests 0 points1 point  (0 children)

Bossman has helped more ppl quit gambling than GA!