anaxagoras7 commited on
Commit
d190460
1 Parent(s): 2ad69e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -6,7 +6,7 @@ io1 = gr.Interface.load('huggingface/sshleifer/distilbart-cnn-12-6')
6
  io2 = gr.Interface.load("huggingface/facebook/bart-large-cnn")
7
  io3 = gr.Interface.load("huggingface/google/pegasus-xsum")
8
 
9
- desc = "Let Hugging Face models summarize articles for you. \nNote: Shorter articles generate faster summaries. \nThis summarizer uses bart-large-cnn model by Facebook, pegasus by Google and distilbart-cnn-12-6 by Sshleifer. \nYou can compare these models against each other on their performances. \nSample Text input is provided!"
10
 
11
  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.
12
  """
@@ -22,7 +22,7 @@ All extraction-based summarizers perform the following three relatively independ
22
  z = '''Machine Learning Technology Trends To Impact Business in 2022
23
  In this article, we will discuss the latest innovations in machine learning technology in 2021 from our perspective as a machine learning software development company. We’ll go over 9 trends and explain how the latest innovations in machine learning technologies can benefit you and your business in 2022.
24
 
25
- \n1. No-Code Machine Learning
26
  2. TinyML
27
  3. AutoML
28
  4. Machine Learning Operationalization Management
@@ -32,13 +32,13 @@ In this article, we will discuss the latest innovations in machine learning tech
32
  8. Reinforcement Learning
33
  '''
34
 
35
- sample = [[x],[y],[z]]
36
 
37
  iface = Parallel(io1, io2, io3,
38
  theme='huggingface',
39
- title= 'Hugging Face Text Summarizer',
40
  description = desc,
41
- examples=sample,
42
  inputs = gr.inputs.Textbox(lines = 10, label="Text"))
43
 
44
  iface.launch(inline = False)
 
6
  io2 = gr.Interface.load("huggingface/facebook/bart-large-cnn")
7
  io3 = gr.Interface.load("huggingface/google/pegasus-xsum")
8
 
9
+ desc = "Let Hugging Face models summarize texts for you. Note: Shorter articles generate faster summaries. This summarizer uses bart-large-cnn model by Facebook, pegasus by Google and distilbart-cnn-12-6 by Sshleifer. You can compare these models against each other on their performances. Sample Text input is provided!"
10
 
11
  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.
12
  """
 
22
  z = '''Machine Learning Technology Trends To Impact Business in 2022
23
  In this article, we will discuss the latest innovations in machine learning technology in 2021 from our perspective as a machine learning software development company. We’ll go over 9 trends and explain how the latest innovations in machine learning technologies can benefit you and your business in 2022.
24
 
25
+ 1. No-Code Machine Learning
26
  2. TinyML
27
  3. AutoML
28
  4. Machine Learning Operationalization Management
 
32
  8. Reinforcement Learning
33
  '''
34
 
35
+ sample = [[y],[x],[z]]
36
 
37
  iface = Parallel(io1, io2, io3,
38
  theme='huggingface',
39
+ title= 'Hugging Face Text Summarizer',
40
  description = desc,
41
+ examples=sample, #replace "sample" with directory to let gradio scan through those files and give you the text
42
  inputs = gr.inputs.Textbox(lines = 10, label="Text"))
43
 
44
  iface.launch(inline = False)