Spaces:
Sleeping
Sleeping
File size: 628 Bytes
148e8e7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
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() |