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()