Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,19 +1,34 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
-
sdk:
|
| 7 |
-
|
| 8 |
-
tags:
|
| 9 |
-
- streamlit
|
| 10 |
pinned: false
|
| 11 |
-
short_description: This Streamlit app analyzes the sentiment (+ve,-ve,=)
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Sentiment-Aware Text Generator
|
| 3 |
+
emoji: 🤖
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
app_file: app.py
|
|
|
|
|
|
|
| 8 |
pinned: false
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Sentiment-Aware Text Generator
|
| 12 |
+
|
| 13 |
+
This app leverages Hugging Face pretrained models to generate paragraphs aligned with the sentiment of an input prompt.
|
| 14 |
+
|
| 15 |
+
## How It Works
|
| 16 |
+
|
| 17 |
+
1. The user enters a text prompt into the Streamlit web interface.
|
| 18 |
+
2. The app uses a RoBERTa-based sentiment analysis model to classify the sentiment as positive, negative, or neutral.
|
| 19 |
+
3. Based on this sentiment, it crafts a prompt for text generation.
|
| 20 |
+
4. The Qwen text-generation model generates a paragraph matching the detected sentiment.
|
| 21 |
+
5. The app displays both the detected sentiment and the generated paragraph interactively.
|
| 22 |
+
|
| 23 |
+
## Requirements
|
| 24 |
+
|
| 25 |
+
The app requires Python packages listed in `requirements.txt`, including:
|
| 26 |
+
|
| 27 |
+
- streamlit
|
| 28 |
+
- transformers
|
| 29 |
+
- torch
|
| 30 |
|
| 31 |
+
## Running the App
|
| 32 |
|
| 33 |
+
To run:
|
| 34 |
+
https://huggingface.co/spaces/dimoZ/AI_Sentiment_Essay_Generato
|