import gradio as gr import requests def generate_answer(prompt): # The URL of the Flask server url = 'https://entelidemo.replit.app/generate_answer' # The payload in JSON format payload = {'prompt': prompt} # Make a POST request to the server response = requests.post(url, json=payload) if response.status_code == 200: return str(response.json()) else: return "An error occurred" def main(): interface = gr.Interface( fn=generate_answer, inputs="text", outputs="text", title="Enteli-49B Demo", description="Normally model remembers its past conversations, however for demo purposes this feature is not included. Again it can be a bit slow since it is a demo only. System Prompt: You are a helpful AI assistant called Enteli developed by the AI company EnteliMind." ) interface.launch() if __name__ == "__main__": main()