Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
#
|
| 5 |
model = pipeline(
|
| 6 |
"text-generation",
|
| 7 |
-
model="
|
| 8 |
max_new_tokens=200,
|
| 9 |
do_sample=True,
|
| 10 |
temperature=0.7
|
|
@@ -16,7 +16,7 @@ def chat(history, user_input):
|
|
| 16 |
return history, ""
|
| 17 |
|
| 18 |
with gr.Blocks() as demo:
|
| 19 |
-
gr.Markdown("## 日本語文章の要約・質問チャット(軽量版)")
|
| 20 |
|
| 21 |
chatbot = gr.Chatbot(height=500)
|
| 22 |
text_input = gr.Textbox(
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
# 無料スペースで確実に動く日本語モデル
|
| 5 |
model = pipeline(
|
| 6 |
"text-generation",
|
| 7 |
+
model="cyberagent/open-calm-3b",
|
| 8 |
max_new_tokens=200,
|
| 9 |
do_sample=True,
|
| 10 |
temperature=0.7
|
|
|
|
| 16 |
return history, ""
|
| 17 |
|
| 18 |
with gr.Blocks() as demo:
|
| 19 |
+
gr.Markdown("## 日本語文章の要約・質問チャット(軽量・安定版)")
|
| 20 |
|
| 21 |
chatbot = gr.Chatbot(height=500)
|
| 22 |
text_input = gr.Textbox(
|