Tminus1 commited on
Commit
140afa5
·
1 Parent(s): 5d3ce91

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +18 -11
main.py CHANGED
@@ -1,13 +1,20 @@
1
- from transformers import pipeline
 
2
 
3
- summarizer = pipeline("summarization")
4
 
5
- def get_summary(text, max_length=200, min_length=50):
6
- summary = summarizer(text, max_length, min_length, do_sample=Flase)
7
- return summary
8
-
9
- for i in range(10):
10
- my_input = input("Enter the text to summerize: ")
11
- output = get_summary(my_input)
12
- print(my_output)
13
-
 
 
 
 
 
 
 
1
+ from simplet5 import SimpleT5
2
+ model = SimpleT5()
3
 
4
+ model.load_model("t5","snrspeaks/t5-one-line-summary")
5
 
6
+ abstract = """We describe a system called Overton, whose main design goal is to
7
+ support engineers in building, monitoring, and improving production machine learning systems.
8
+ Key challenges engineers face are monitoring fine-grained quality, diagnosing errors in
9
+ sophisticated applications, and handling contradictory or incomplete supervision data.
10
+ Overton automates the life cycle of model construction, deployment, and monitoring by providing a
11
+ set of novel high-level, declarative abstractions. Overton's vision is to shift developers to
12
+ these higher-level tasks instead of lower-level machine learning tasks. In fact, using Overton,
13
+ engineers can build deep-learning-based applications without writing any code
14
+ in frameworks like TensorFlow. For over a year, Overton has been used in production to support multiple
15
+ applications in both near-real-time applications and back-of-house processing.
16
+ In that time, Overton-based applications have answered billions of queries in multiple
17
+ languages and processed trillions of records reducing errors 1.7-2.9 times versus production systems.
18
+ """
19
+
20
+ model.predict(abstract)