from gradio_client import Client client = Client("https://67fe55d27b801df823.gradio.live/") def respond(english_text): darija_translated_text = client.predict( text=english_text, api_name="/predict" ) return darija_translated_text app = gr.Interface(fn=respond, inputs="text", outputs="text", title="Terjman-Ultra 👨‍💻", description="Translate English text to Moroccan Darija 🤗") if __name__ == "__main__": app.launch()