Spaces:
Sleeping
Sleeping
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() | |