ayoubkirouane commited on
Commit
d6bb89e
·
verified ·
1 Parent(s): cab5616

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -1,20 +1,20 @@
1
- # Use a pipeline as a high-level helper
2
  from transformers import pipeline
3
  import gradio as gr
 
4
  pipe = pipeline("summarization", model="ayoubkirouane/T5-4-Summarization")
5
- def summarization(text) :
6
- return pipe(text)[0]["summary_text"]
 
 
7
  # Create a Gradio interface
8
  iface = gr.Interface(
9
  fn=summarization,
10
- inputs=gr.Textbox(prompt="Input Text"),
11
- outputs=gr.Textbox(prompt="Generated Summary") ,
12
- allow_flagging=False ,
13
- title="T5-4-Summarization" ,
14
  description="This app generates a summary of the input text using T5 fine-tuned model.",
15
-
16
-
17
  )
18
 
19
  # Launch the Gradio app
20
- iface.launch(debug=True)
 
 
1
  from transformers import pipeline
2
  import gradio as gr
3
+
4
  pipe = pipeline("summarization", model="ayoubkirouane/T5-4-Summarization")
5
+
6
+ def summarization(text):
7
+ return pipe(text)[0]["summary_text"]
8
+
9
  # Create a Gradio interface
10
  iface = gr.Interface(
11
  fn=summarization,
12
+ inputs=gr.Textbox(label="Input Text"),
13
+ outputs=gr.Textbox(label="Generated Summary"),
14
+ allow_flagging=False,
15
+ title="T5-4-Summarization",
16
  description="This app generates a summary of the input text using T5 fine-tuned model.",
 
 
17
  )
18
 
19
  # Launch the Gradio app
20
+ iface.launch(debug=True)