renad0 commited on
Commit
f1bd284
Β·
verified Β·
1 Parent(s): bd48cb1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +54 -70
README.md CHANGED
@@ -3,73 +3,57 @@ license: apache-2.0
3
  title: 'HeadlinesGen:Partmone '
4
  sdk: gradio
5
  ---
6
- Final Project: Part One
7
- Headlines Generation Project:
8
- This project is all about making it easier to come up with the perfect headline. The goal is to
9
- create an app that helps generate clear, engaging, and relevant headlines for articles in both
10
- Arabic and English. Instead of struggling to summarize an article, users can get an instant, wellmatched headline with just a click. The app is designed to be simple and efficient, allowing
11
- users to choose their preferred language and quickly get the best possible headline with
12
- generated audio without the hassle.
13
- Pipelines:
14
- Headlines Generator:
15
- β€’ The app generates headlines based on the provided article text in English using the
16
- Michau/t5-base-en-generate-headline model.
17
- β€’ If the input is in English, the headline is generated directly in English.
18
- Translation:
19
- β€’ If the input is in Arabic, it is first translated to English using Helsinki-NLP/opus-mt-aren, then the headline is generated in English, and finally, it is translated back to Arabic
20
- using Helsinki-NLP/opus-mt-en-ar.
21
- β€’ This ensures the app provides a headline in the desired language, whether the input
22
- is in English or Arabic.
23
- Text-to-Speech:
24
- β€’ The app supports text-to-speech conversion for both English and Arabic.
25
- β€’ Arabic: To convert the Arabic headline to speech using facebook/mms-tts-ara.
26
- β€’ English: To convert the English headline to speech using microsoft/speecht5_tts.
27
- How to use the interface:
28
- The app uses Gradio for building a simple interface where users can select the language, input
29
- text, and receive the generated headline with an audio.
30
- Select Language: Choose between Arabic or English.
31
- Enter Article Text: Type or paste the article text from which you want to generate a
32
- headline.
33
- Get Headline: Once the button is clicked, a headline will be generated.
34
- Get Audio: An audio of the headline also will be generated.
35
- Example Input:
36
- Select Language: English
37
- Text/Article: " Greenhouse gas emissions, primarily carbon dioxide (CO2) and methane
38
- (CH4), are the main drivers of global climate change. Human activities, such as burning fossil
39
- fuels for energy, deforestation, and industrial processes, have significantly increased the
40
- concentration of these gases in the atmosphere. According to the Intergovernmental Panel
41
- on Climate Change (IPCC), CO2 levels have risen by over 50% since the pre-industrial era,
42
- contributing to rising global temperatures. "
43
- Expected Output (A headline in English): Global Warming - The Main Driver of Global
44
- Climate Change.
45
- An audio that read the headline.
46
- Why We Chose These Models:
47
- Headlines Generator:
48
- We selected Michau/t5-base-en-generate-headline for headline generation because it has
49
- been trained on a collection of 500,000 articles with corresponding headings, making it wellsuited for this task. The model is specifically designed to generate concise and relevant
50
- headlines from article text.
51
- Translation:
52
- We use the Helsinki-NLP/opus-mt-ar-en and Helsinki-NLP/opus-mt-en-ar models to
53
- translate back and forth between Arabic and English. Since the main headline generation
54
- model does not support Arabic, we had to find a way to generate headlines in Arabic.
55
- To achieve this, we first translate Arabic input into English so that the headline generation
56
- model can process it and produce a proper English headline. Since we want the headline to
57
- match the article's original language, we then translate the generated English headline back
58
- into Arabic before outputting it.
59
- Because translation accuracy is crucial for maintaining the meaning of the headlines, we
60
- carefully selected our translation models based on popularity and high download rates,
61
- ensuring they are optimized specifically for Arabic and English.
62
- Text-to-speech:
63
- Arabic Text-to-Speech: We selected facebook/mms-tts-ara for Arabic text-to-speech after
64
- evaluating multiple models. This model provided the best pronunciation and clarity, ensuring
65
- high-quality Arabic speech.
66
- English Text-to-Speech: We chose microsoft/speecht5_tts for English text-to-speech due to
67
- its superior pronunciation and clarity. As a Microsoft-developed model, it leverages state-ofthe-art technology to produce natural and highly reliable speech, making it an ideal choice
68
- for our project.
69
- Special Measures Taken to Support the Arabic Language:
70
- Since our chosen headline generation model Michau/t5-base-en-generate-headline only
71
- supports English, we implemented a translation pipeline to ensure that Arabic inputs can be
72
- processed effectively.
73
- To achieve this, we use the Helsinki-NLP/opus-mt-ar-en model to translate Arabic text into
74
- English before generating a headline. Once the headline is created in English, we then use
75
- the Helsinki-NLP/opus-mt-en-ar model to translate it back into Arabic
 
3
  title: 'HeadlinesGen:Partmone '
4
  sdk: gradio
5
  ---
6
+ # Headlines Generation Project
7
+
8
+ This project is all about making it easier to come up with the perfect headline. The goal is to create an app that helps generate clear, engaging, and relevant headlines for articles in both Arabic and English. Instead of struggling to summarize an article, users can get an instant, well-matched headline with just a click. The app is designed to be simple and efficient, allowing users to choose their preferred language and quickly get the best possible headline with generated audio without the hassle.
9
+
10
+ ## Pipelines:
11
+
12
+ ### Headlines Generator:
13
+ - The app generates headlines based on the provided article text in English using the **Michau/t5-base-en-generate-headline** model.
14
+ - If the input is in English, the headline is generated directly in English.
15
+
16
+ ### Translation:
17
+ - If the input is in Arabic, it is first translated to English using **Helsinki-NLP/opus-mt-ar-en**, then the headline is generated in English, and finally, it is translated back to Arabic using **Helsinki-NLP/opus-mt-en-ar**.
18
+ - This ensures the app provides a headline in the desired language, whether the input is in English or Arabic.
19
+
20
+ ### Text-to-Speech:
21
+ - The app supports text-to-speech conversion for both English and Arabic.
22
+ - **Arabic**: To convert the Arabic headline to speech using **facebook/mms-tts-ara**.
23
+ - **English**: To convert the English headline to speech using **microsoft/speecht5_tts**.
24
+
25
+ ## How to use the interface:
26
+ The app uses **Gradio** for building a simple interface where users can select the language, input text, and receive the generated headline with an audio.
27
+
28
+ - **Select Language**: Choose between Arabic or English.
29
+ - **Enter Article Text**: Type or paste the article text from which you want to generate a headline.
30
+ - **Get Headline**: Once the button is clicked, a headline will be generated.
31
+ - **Get Audio**: An audio of the headline will also be generated.
32
+
33
+ ### Example Input:
34
+ - **Select Language**: English
35
+ - **Text/Article**:
36
+ "Greenhouse gas emissions, primarily carbon dioxide (CO2) and methane (CH4), are the main drivers of global climate change. Human activities, such as burning fossil fuels for energy, deforestation, and industrial processes, have significantly increased the concentration of these gases in the atmosphere. According to the Intergovernmental Panel on Climate Change (IPCC), CO2 levels have risen by over 50% since the pre-industrial era, contributing to rising global temperatures."
37
+
38
+ ### Expected Output (A headline in English):
39
+ - "Global Warming - The Main Driver of Global Climate Change."
40
+ - An audio that reads the headline.
41
+
42
+ ## Why We Chose These Models:
43
+
44
+ ### Headlines Generator:
45
+ We selected **Michau/t5-base-en-generate-headline** for headline generation because it has been trained on a collection of 500,000 articles with corresponding headings, making it well-suited for this task. The model is specifically designed to generate concise and relevant headlines from article text.
46
+
47
+ ### Translation:
48
+ We use the **Helsinki-NLP/opus-mt-ar-en** and **Helsinki-NLP/opus-mt-en-ar** models to translate back and forth between Arabic and English. Since the main headline generation model does not support Arabic, we had to find a way to generate headlines in Arabic. To achieve this, we first translate Arabic input into English so that the headline generation model can process it and produce a proper English headline. Since we want the headline to match the article's original language, we then translate the generated English headline back into Arabic before outputting it.
49
+
50
+ Because translation accuracy is crucial for maintaining the meaning of the headlines, we carefully selected our translation models based on popularity and high download rates, ensuring they are optimized specifically for Arabic and English.
51
+
52
+ ### Text-to-speech:
53
+ - **Arabic Text-to-Speech**: We selected **facebook/mms-tts-ara** for Arabic text-to-speech after evaluating multiple models. This model provided the best pronunciation and clarity, ensuring high-quality Arabic speech.
54
+ - **English Text-to-Speech**: We chose **microsoft/speecht5_tts** for English text-to-speech due to its superior pronunciation and clarity. As a Microsoft-developed model, it leverages state-of-the-art technology to produce natural and highly reliable speech, making it an ideal choice for our project.
55
+
56
+ ## Special Measures Taken to Support the Arabic Language:
57
+ Since our chosen headline generation model **Michau/t5-base-en-generate-headline** only supports English, we implemented a translation pipeline to ensure that Arabic inputs can be processed effectively. To achieve this, we use the **Helsinki-NLP/opus-mt-ar-en** model to translate Arabic text into English before generating a headline. Once the headline is created in English, we then use the **Helsinki-NLP/opus-mt-en-ar** model to translate it back into Arabic.
58
+
59
+ ---