File size: 473 Bytes
05f5325
a7c4b78
c7347e1
a7c4b78
 
 
c7347e1
a7c4b78
 
 
 
 
 
f5d4e69
a7c4b78
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
from Text2Long_text import generate_korean_story

def make_story(user_prompt):
    # generate_korean_story 함수에 유저 입력과 길이 전달
    return generate_korean_story(user_prompt, max_length=500)

# Gradio 인터페이스
demo = gr.Interface(
    fn=make_story,
    inputs=gr.Textbox(label="프롬프트(이야기 주제 또는 첫 문장) 입력"),
    outputs=gr.Textbox(label="AI가 생성한 긴 한국어 이야기")
)

demo.launch()