Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files- app.py.py +26 -0
- geometry.py +26 -0
- requirements.txt +3 -0
app.py.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import cv2
|
| 3 |
+
import numpy as np
|
| 4 |
+
from datetime import datetime, timedelta
|
| 5 |
+
from geometry import extract_candle_data, detect_valid_signal
|
| 6 |
+
|
| 7 |
+
def predict_signal(image):
|
| 8 |
+
try:
|
| 9 |
+
# Resize for consistency
|
| 10 |
+
image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
|
| 11 |
+
candle_data = extract_candle_data(image)
|
| 12 |
+
signal = detect_valid_signal(candle_data)
|
| 13 |
+
return signal if signal else "No signal (conditions not met)"
|
| 14 |
+
except Exception as e:
|
| 15 |
+
return f"Error: {str(e)}"
|
| 16 |
+
|
| 17 |
+
iface = gr.Interface(
|
| 18 |
+
fn=predict_signal,
|
| 19 |
+
inputs=gr.Image(type="numpy", label="Upload Chart Screenshot"),
|
| 20 |
+
outputs=gr.Textbox(label="Signal Output"),
|
| 21 |
+
title="TRANSFINITY FINAL CORE v.ULTIMA",
|
| 22 |
+
description="Upload a Quotex OTC chart to get the next 1-minute binary options signal. Timezone: UTC+6"
|
| 23 |
+
)
|
| 24 |
+
|
| 25 |
+
if __name__ == "__main__":
|
| 26 |
+
iface.launch()
|
geometry.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import numpy as np
|
| 2 |
+
import cv2
|
| 3 |
+
from datetime import datetime
|
| 4 |
+
|
| 5 |
+
def extract_candle_data(image):
|
| 6 |
+
# Basic HSV-based detection placeholder
|
| 7 |
+
# You should replace with your detailed TRANSFINITY detection logic
|
| 8 |
+
return {
|
| 9 |
+
"candles": [], # Populate with parsed candle info
|
| 10 |
+
"current_time": datetime.utcnow() + timedelta(hours=6), # UTC+6
|
| 11 |
+
"asset": "UNKNOWN_OTC"
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
def detect_valid_signal(data):
|
| 15 |
+
# Placeholder signal logic (replace with scoring engine)
|
| 16 |
+
current_time = data["current_time"]
|
| 17 |
+
time_str = current_time.strftime("%H:%M")
|
| 18 |
+
asset = data["asset"]
|
| 19 |
+
|
| 20 |
+
# Insert your advanced scoring + filter logic here
|
| 21 |
+
# For now, simulate a PUT signal
|
| 22 |
+
signal_ok = True # Replace with your conditions
|
| 23 |
+
|
| 24 |
+
if signal_ok:
|
| 25 |
+
return f"{time_str} • {asset} • PUT"
|
| 26 |
+
return None
|
requirements.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio
|
| 2 |
+
opencv-python
|
| 3 |
+
numpy
|