Spaces:
Runtime error
Runtime error
Update space
Browse files
app.py
CHANGED
|
@@ -1,9 +1,15 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
|
| 8 |
-
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 9 |
-
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from Text2Long_text import generate_korean_story
|
| 3 |
|
| 4 |
+
def make_story(user_prompt):
|
| 5 |
+
# generate_korean_story 함수에 유저 입력과 길이 전달
|
| 6 |
+
return generate_korean_story(user_prompt, max_length=500)
|
| 7 |
|
| 8 |
+
# Gradio 인터페이스
|
| 9 |
+
demo = gr.Interface(
|
| 10 |
+
fn=make_story,
|
| 11 |
+
inputs=gr.Textbox(label="프롬프트(이야기 주제 또는 첫 문장) 입력"),
|
| 12 |
+
outputs=gr.Textbox(label="AI가 생성한 긴 한국어 이야기")
|
| 13 |
+
)
|
| 14 |
|
| 15 |
+
demo.launch()
|
|
|
|
|
|