import gradio as gr import subprocess import os import uuid def convert_to_apk(manifest_url): apk_id = str(uuid.uuid4()) result = subprocess.run( ["bash", "entrypoint.sh", manifest_url, apk_id], capture_output=True, text=True ) apk_path = f"{apk_id}/app-release-signed.apk" if os.path.exists(apk_path): return apk_path else: return f"Error:\n{result.stderr}" iface = gr.Interface( fn=convert_to_apk, inputs=gr.Textbox(label="Manifest.json URL"), outputs=gr.File(label="Download APK"), title="URL to APK", description="Paste the public URL of a manifest.json from your PWA" ) iface.launch()