File size: 871 Bytes
8ad50f2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import gradio as gr
import cv2
import numpy as np
from datetime import datetime, timedelta
from geometry import extract_candle_data, detect_valid_signal

def predict_signal(image):
    try:
        # Resize for consistency
        image = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
        candle_data = extract_candle_data(image)
        signal = detect_valid_signal(candle_data)
        return signal if signal else "No signal (conditions not met)"
    except Exception as e:
        return f"Error: {str(e)}"

iface = gr.Interface(
    fn=predict_signal,
    inputs=gr.Image(type="numpy", label="Upload Chart Screenshot"),
    outputs=gr.Textbox(label="Signal Output"),
    title="TRANSFINITY FINAL CORE v.ULTIMA",
    description="Upload a Quotex OTC chart to get the next 1-minute binary options signal. Timezone: UTC+6"
)

if __name__ == "__main__":
    iface.launch()