zetaah commited on
Commit
2f38da0
1 Parent(s): 93aa9f7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +78 -1
README.md CHANGED
@@ -9,4 +9,81 @@ app_file: app.py
9
  pinned: false
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  pinned: false
10
  ---
11
 
12
+ # MaghrebInsights: Analyse de la Propagande Algérienne
13
+
14
+ This Streamlit application provides insights into Algerian propaganda by analyzing text data from Algerian news sources. It leverages the power of Google's Gemini large language model to generate insightful reports on potential propaganda techniques and their political implications.
15
+
16
+ ## Features
17
+
18
+ - **Data Analysis:** Extracts key information from Algerian news articles.
19
+ - **Propaganda Detection:** Identifies and analyzes potential instances of propaganda techniques (e.g., disinformation, manipulation).
20
+ - **Political Contextualization:** Provides insights into the political motivations and implications of the identified propaganda.
21
+ - **Report Generation:** Generates comprehensive reports summarizing findings, analysis, and recommendations.
22
+ - **User-Friendly Interface:** Easy-to-use Streamlit interface for seamless interaction.
23
+
24
+ ## Getting Started
25
+
26
+ ### Prerequisites
27
+
28
+ - **Python 3.7+:** [https://www.python.org/downloads/](https://www.python.org/downloads/)
29
+ - **Google Generative AI API Key:** Obtain an API key from [https://developers.google.com/generative-ai/docs/setup](https://developers.google.com/generative-ai/docs/setup)
30
+ - **Data File (`data_tsa.json`):** Place your JSON data file containing Algerian news articles in the project root.
31
+
32
+ ### Local Setup
33
+
34
+ 1. **Clone the repository:**
35
+ ```bash
36
+ git clone https://github.com/your-username/your-repo-name.git
37
+ cd your-repo-name
38
+ ```
39
+ 2. **Create a Virtual Environment (Recommended):**
40
+ ```bash
41
+ python3 -m venv .venv
42
+ source .venv/bin/activate
43
+ ```
44
+ 3. **Install Dependencies:**
45
+ ```bash
46
+ pip install -r requirements.txt
47
+ ```
48
+ 4. **Set Environment Variable:**
49
+ ```bash
50
+ export GENAI_API_KEY="your_actual_api_key"
51
+ ```
52
+ (Replace "your_actual_api_key" with your Google Generative AI API key)
53
+ 5. **Run the Streamlit App:**
54
+ ```bash
55
+ streamlit run app.py
56
+ ```
57
+
58
+ ### Deployment on Hugging Face Spaces
59
+
60
+ 1. **Create a Hugging Face Account:** [https://huggingface.co/](https://huggingface.co/)
61
+ 2. **Create a New Space:** Click "New Space", choose "Streamlit" as the SDK, and provide a name for your Space.
62
+ 3. **Upload Your Code:**
63
+ - Upload the following files to your Hugging Face Space:
64
+ - `app.py` (your main Streamlit application)
65
+ - `requirements.txt`
66
+ - `data_tsa.json` (your data file)
67
+ 4. **Set Environment Variable (Secret):**
68
+ - Go to your Space's settings -> "Secrets" -> "New secret":
69
+ - **Name:** `GENAI_API_KEY`
70
+ - **Secret value:** Paste your actual Google Generative AI API key.
71
+ 5. **Hugging Face will automatically build and deploy your Streamlit app!**
72
+
73
+ ## Usage
74
+
75
+ 1. **Input Word:** Enter a keyword related to Morocco in the sidebar to analyze its presence and context in the data.
76
+ 2. **Generate Report:** Click the "Générer le Rapport Complet" button to trigger the analysis and report generation process.
77
+ 3. **Review Insights:** Carefully examine the generated report, which provides:
78
+ - A summary of the data.
79
+ - A critical analysis of potential propaganda techniques.
80
+ - Insights into the political context.
81
+ - Recommendations based on the findings.
82
+
83
+ ## Contributing
84
+
85
+ Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions for improvement or would like to add new features.
86
+
87
+ ## License
88
+
89
+ This project is licensed under the [MIT License](LICENSE).