HaloMaster commited on
Commit
b3a9dbf
1 Parent(s): 50f0fbb
app.py CHANGED
@@ -1,4 +1,14 @@
 
 
 
 
1
  import gradio as gr
 
 
 
 
 
 
2
 
3
  def greet(name):
4
  return "Hello " + name + "!!"
1
+ import sys
2
+ sys.path.append("./fengshen/examples/pegasus/")
3
+
4
+ import fengshen
5
  import gradio as gr
6
+ from transformers import PegasusForConditionalGeneration
7
+ from tokenizers_pegasus import PegasusTokenizer
8
+
9
+ model = PegasusForConditionalGeneration.from_pretrained("IDEA-CCNL/Randeng-Pegasus-523M-Summary-Chinese")
10
+ tokenizer = PegasusTokenizer.from_pretrained("IDEA-CCNL/Randeng-Pegasus-523M-Summary-Chinese")
11
+
12
 
13
  def greet(name):
14
  return "Hello " + name + "!!"
fengshen/__pycache__/__init__.cpython-39.pyc ADDED
Binary file (456 Bytes). View file
fengshen/examples/pegasus/__pycache__/data_utils.cpython-39.pyc ADDED
Binary file (7.64 kB). View file
fengshen/examples/pegasus/__pycache__/tokenizers_pegasus.cpython-39.pyc ADDED
Binary file (19.7 kB). View file
fengshen/models/__pycache__/__init__.cpython-39.pyc ADDED
Binary file (154 Bytes). View file
fengshen/models/longformer/__pycache__/__init__.cpython-39.pyc ADDED
Binary file (912 Bytes). View file
fengshen/models/longformer/__pycache__/configuration_longformer.cpython-39.pyc ADDED
Binary file (234 Bytes). View file
fengshen/models/longformer/__pycache__/modeling_longformer.cpython-39.pyc ADDED
Binary file (79.9 kB). View file
fengshen/models/megatron_t5/__pycache__/__init__.cpython-39.pyc ADDED
Binary file (722 Bytes). View file
fengshen/models/megatron_t5/__pycache__/configuration_megatron_t5.cpython-39.pyc ADDED
Binary file (8.79 kB). View file
fengshen/models/megatron_t5/__pycache__/modeling_megatron_t5.cpython-39.pyc ADDED
Binary file (54.9 kB). View file
fengshen/models/roformer/__pycache__/__init__.cpython-39.pyc ADDED
Binary file (890 Bytes). View file
fengshen/models/roformer/__pycache__/configuration_roformer.cpython-39.pyc ADDED
Binary file (6.01 kB). View file
fengshen/models/roformer/__pycache__/modeling_roformer.cpython-39.pyc ADDED
Binary file (53.2 kB). View file
fengshen/models/ubert/__pycache__/__init__.cpython-39.pyc ADDED
Binary file (256 Bytes). View file
fengshen/models/ubert/__pycache__/modeling_ubert.cpython-39.pyc ADDED
Binary file (20.8 kB). View file
requirements.txt CHANGED
@@ -1,3 +1,4 @@
1
  transformers
2
  torch
3
  gradio
 
1
  transformers
2
  torch
3
  gradio
4
+ rouge