ogawa0071 commited on
Commit
2dbd061
1 Parent(s): 619d9fb

cyberagent-open-calm-small

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,12 +1,18 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- generator = pipeline("text-generation", model="cyberagent/open-calm-small")
 
 
 
 
 
5
 
6
  def generate(text):
7
  result = generator(text)
8
  return result[0]["generated_text"]
9
 
 
10
  examples = [
11
  ["AIによって私達の暮らしは、"],
12
  ]
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ generator = pipeline(
5
+ "text-generation",
6
+ model="cyberagent/open-calm-small",
7
+ tokenizer="cyberagent/open-calm-small",
8
+ )
9
+
10
 
11
  def generate(text):
12
  result = generator(text)
13
  return result[0]["generated_text"]
14
 
15
+
16
  examples = [
17
  ["AIによって私達の暮らしは、"],
18
  ]