Spaces:
Sleeping
Sleeping
| from gradio import Interface | |
| import subprocess | |
| import os | |
| def start_nextjs(): | |
| # Next.js μλ² μμ | |
| subprocess.Popen(["npm", "start"]) | |
| return "Next.js μλ²κ° μμλμμ΅λλ€. http://localhost:3000 μμ μ μν μ μμ΅λλ€." | |
| # Gradio μΈν°νμ΄μ€ μμ± | |
| iface = Interface( | |
| fn=start_nextjs, | |
| inputs=None, | |
| outputs="text", | |
| title="μΈμΌν°λΈ μμ€ν λ°λͺ¨", | |
| description="Next.js κΈ°λ°μ μΈμΌν°λΈ μμ€ν λ°λͺ¨μ λλ€. GraphQL APIμ WebSocketμ ν΅ν΄ μ€μκ° μ λ°μ΄νΈλ₯Ό μ 곡ν©λλ€." | |
| ) | |
| # μλ² μμ | |
| if __name__ == "__main__": | |
| iface.launch() |