import subprocess import sys if __name__ == "__main__": # Correct way to run gpt4free API on port 7860 subprocess.run([ sys.executable, "-m", "g4f", "api", "--bind", "0.0.0.0:7860", "--debug" ])