Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import requests | |
| def proxy(url): | |
| try: | |
| # A szerver (Hugging Face) letölti az oldalt | |
| res = requests.get(url, timeout=10) | |
| return res.text | |
| except Exception as e: | |
| return f"Hiba: {e}" | |
| # Megnézzük az IP-t rögtön indításkor a logba | |
| print("Saját IP-m:", requests.get("https://api.myip.com").text) | |
| interface = gr.Interface( | |
| fn=proxy, | |
| inputs=gr.Textbox(label="Írd be a címet (pl. https://api.myip.com)"), | |
| outputs=gr.HTML(), | |
| title="Saját HF Proxy Teszt" | |
| ) | |
| interface.launch() | |