portal / app.py
bluewhale2025's picture
Add AI Tree Portal
148e8e7
raw
history blame contribute delete
628 Bytes
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()