Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/parthipan-natkunam/basic-social-text-formatter

A quick and basic formatting tool for social media posts, with an enhanced sentiment analysis using EdgeAI
https://github.com/parthipan-natkunam/basic-social-text-formatter

edgeai gemini-nano-in-chrome svelte typescript webcomponent

Last synced: 19 days ago
JSON representation

A quick and basic formatting tool for social media posts, with an enhanced sentiment analysis using EdgeAI

Awesome Lists containing this project

README

        

## Social Text Formatter

This is a simple text formatter that makes your social media posts look pretty by enabling bold and italics texts. It uses a `Unicode Substituion` technique to workaround the rendering limitations of such texts on social media platforms.

> [!TIP]
> The app also uses an EdgeAI (Gemini-nano on Chrome) for a feature that allows you to detect the overall perceived sentiment of your post content. To use this feature you'll need to enable the `experimental` gemini nano prompting flag in your Chrome browser settings.

![Screenshot](docs/screenshot1.png)

## Quick Links

- [Steps to Run Locally](#steps-to-run-locally)
- [Steps to Enable Gemini-nano On-device Model on Chrome](#steps-to-enable-gemini-nano-on-device-model-on-chrome)
- [Standalone Usage](#standalone-usage)
- [Architecture (HLD)](#architecture)

### Steps to Run Locally

1. Clone the repository
2. Change into the repository's root directory
3. Run `npm install`
4. Run `npm run dev`

### Steps to Enable Gemini-nano On-device Model on Chrome

1. On your Chrome browser, navigate to `chrome://flags`
2. Search for `Prompt API for Gemini Nano`
![Chrome Flag](docs/chrome_flag.png)

3. Enable the flag and restart your browser

### Standalone Usage

Since the build exports a native webcomponent, you can use it in any HTML file by importing the script and using the tag ``

1. Build the project by running `npm run build`
2. Copy the built `index` js file from the `assets` sub-directory in the generated `dist` directory to your project

![Built file](docs/built_file.png)

```html






```
### Architecture
![HLD](docs/hld.svg)