jlazoff commited on
Commit
6ce5d7d
1 Parent(s): 2e4b54d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -28
app.py CHANGED
@@ -6,20 +6,20 @@ from gradio.mix import Parallel, Series
6
 
7
  io1 = gr.Interface.load('huggingface/google/pegasus-large')
8
  io2 = gr.Interface.load("huggingface/google/pegasus-cnn_dailymail")
9
- io3 = gr.Interface.load("huggingface/google/pegasus-xsum")
10
  io4 = gr.Interface.load('huggingface/google/pegasus-newsroom')
11
  io5 = gr.Interface.load("huggingface/google/pegasus-multi_news")
12
- io6 = gr.Interface.load("huggingface/google/pegasus-reddit_tifu")
13
  io7 = gr.Interface.load('huggingface/google/pegasus-arxiv')
14
- # io8 = gr.Interface.load("huggingface/google/pegasus-pubmed")
15
- # io9 = gr.Interface.load("huggingface/google/pegasus-wikihow")
16
- # io10 = gr.Interface.load('huggingface/google/pegasus-gigaword')
17
- # io11 = gr.Interface.load("huggingface/google/pegasus-billsum")
18
- # io12 = gr.Interface.load("huggingface/google/pegasus-big_patent")
19
- # io13 = gr.Interface.load("huggingface/google/pegasus-aeslc")
20
-
21
- desc = "Let Hugging Face models summarize texts for you. Note: Shorter articles generate faster summaries. This summarizer uses pegasus by Google. You can compare these models against each other on their performances."
22
-
23
  x = """ What's A Lawyer Now? Simply put… there is a tremendous manifest and latent need for just about ALL legal services. There are solid interrelated sociological and structural reasons for this including considerable societal divisiveness, meaningful changes in laws and regulations, and fast-paced disruptive technological innovations. At the same time, there are psychological factors that strongly prompt the need for various legal services such as hubris, arrogance, and Machiavellianism. The opportunities, across a wide spectrum of law firm practice areas, have probably never been greater. Although there is a tremendous amount of untapped potential for legal services, there is one major obstacle to opening the spigot – lawyers. From solo practices to mega-international law firms, many lawyers because of their inherent inclinations (e.g., risk aversion) reinforced by their education and firm experience are not going to take advantage of the incredible latent demand for legal services. As commoditization is rampant in the legal profession, the path to success is not just having “excellent knowledge of the law.” Being technical proficient is table stakes. Unfortunately, a large percentage of lawyers equate legal competence with the success of their practice, and the great majority is proven wrong. What is also required of lawyers at all levels, in order to truly excel in today’s legal environment, is a touch of entrepreneurialism coupled with some business savvy. The opportunities for lawyers are most everywhere from inside their own book of business to the clients of other lawyers in their firms to the many other types of professionals they know or can fairly easily get to know. The complication is that when it comes to the business development side of legal work, few lawyers have the expertise to create a steady stream of new work for their practices or their firms. Unless lawyers adopt these best practices, it is unlikely that they will be able to greatly benefit from all the tremendous pent up demand that exists for legal services. Conversely, for those lawyers who take a proactive and systemic approach to business development, their practices could easily grow exponentially.
24
  """
25
 
@@ -40,20 +40,20 @@ In this article, we will discuss the latest innovations in machine learning tech
40
  8. Reinforcement Learning
41
  '''
42
 
43
- sample = [[y],[x],[z]]
44
-
45
- iface = Parallel(io1,
46
- io2,
47
- io3,
48
- io4,
49
- io5,
50
- io6,
51
- io7,
52
- # io8, io9, io10, io11, io12, io13,
53
- theme='huggingface',
54
- title= 'Hugging Face Text Summarizer',
55
- description = desc,
56
- examples=sample, #replace "sample" with directory to let gradio scan through those files and give you the text
57
- inputs = gr.inputs.Textbox(lines = 10, label="Text"))
58
-
59
- iface.launch(inline = False)
 
6
 
7
  io1 = gr.Interface.load('huggingface/google/pegasus-large')
8
  io2 = gr.Interface.load("huggingface/google/pegasus-cnn_dailymail")
9
+ io3 = gr.Interface.load("huggingface/google/pegasus-xsum")
10
  io4 = gr.Interface.load('huggingface/google/pegasus-newsroom')
11
  io5 = gr.Interface.load("huggingface/google/pegasus-multi_news")
12
+ io6 = gr.Interface.load("huggingface/google/pegasus-reddit_tifu")
13
  io7 = gr.Interface.load('huggingface/google/pegasus-arxiv')
14
+ io8 = gr.Interface.load("huggingface/google/pegasus-pubmed")
15
+ io9 = gr.Interface.load("huggingface/google/pegasus-wikihow")
16
+ io10 = gr.Interface.load('huggingface/google/pegasus-gigaword')
17
+ io11 = gr.Interface.load("huggingface/google/pegasus-billsum")
18
+ io12 = gr.Interface.load("huggingface/google/pegasus-big_patent")
19
+ io13 = gr.Interface.load("huggingface/google/pegasus-aeslc")
20
+
21
+ desc = "Let Hugging Face models summarize texts for you. Note: Shorter articles generate faster summaries. This summarizer uses pegasus by Google. You can compare these models against each other on their performances."
22
+
23
  x = """ What's A Lawyer Now? Simply put… there is a tremendous manifest and latent need for just about ALL legal services. There are solid interrelated sociological and structural reasons for this including considerable societal divisiveness, meaningful changes in laws and regulations, and fast-paced disruptive technological innovations. At the same time, there are psychological factors that strongly prompt the need for various legal services such as hubris, arrogance, and Machiavellianism. The opportunities, across a wide spectrum of law firm practice areas, have probably never been greater. Although there is a tremendous amount of untapped potential for legal services, there is one major obstacle to opening the spigot – lawyers. From solo practices to mega-international law firms, many lawyers because of their inherent inclinations (e.g., risk aversion) reinforced by their education and firm experience are not going to take advantage of the incredible latent demand for legal services. As commoditization is rampant in the legal profession, the path to success is not just having “excellent knowledge of the law.” Being technical proficient is table stakes. Unfortunately, a large percentage of lawyers equate legal competence with the success of their practice, and the great majority is proven wrong. What is also required of lawyers at all levels, in order to truly excel in today’s legal environment, is a touch of entrepreneurialism coupled with some business savvy. The opportunities for lawyers are most everywhere from inside their own book of business to the clients of other lawyers in their firms to the many other types of professionals they know or can fairly easily get to know. The complication is that when it comes to the business development side of legal work, few lawyers have the expertise to create a steady stream of new work for their practices or their firms. Unless lawyers adopt these best practices, it is unlikely that they will be able to greatly benefit from all the tremendous pent up demand that exists for legal services. Conversely, for those lawyers who take a proactive and systemic approach to business development, their practices could easily grow exponentially.
24
  """
25
 
 
40
  8. Reinforcement Learning
41
  '''
42
 
43
+ sample = [[y], [x], [z]]
44
+
45
+ iface = Parallel(io1,
46
+ io2,
47
+ io3,
48
+ io4,
49
+ io5,
50
+ io6,
51
+ io7,
52
+ io8, io9, io10, io11, io12, io13,
53
+ theme='huggingface',
54
+ title='Hugging Face Text Summarizer',
55
+ description=desc,
56
+ examples=sample, # replace "sample" with directory to let gradio scan through those files and give you the text
57
+ inputs=gr.inputs.Textbox(lines=10, label="Text"))
58
+
59
+ iface.launch(inline=False)