Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,9 +14,7 @@ def img2text(url):
|
|
14 |
|
15 |
# text2story
|
16 |
def text2story(text):
|
17 |
-
# 创建文本生成的 pipeline 对象
|
18 |
story_pipeline = pipeline("text-generation", model="qihoo360/TinyR1-32B-Preview")
|
19 |
-
# 调用 pipeline 生成故事文本,设置最大长度为 200
|
20 |
result = story_pipeline(text, max_length=200)
|
21 |
story_text = result[0]['generated_text']
|
22 |
return story_text
|
|
|
14 |
|
15 |
# text2story
|
16 |
def text2story(text):
|
|
|
17 |
story_pipeline = pipeline("text-generation", model="qihoo360/TinyR1-32B-Preview")
|
|
|
18 |
result = story_pipeline(text, max_length=200)
|
19 |
story_text = result[0]['generated_text']
|
20 |
return story_text
|