BERT-CryptoTalk / README.md
S-Dreamer's picture
Update README.md
537219a verified
|
Raw
History Blame Contribute Delete
3.49 kB

A newer version of the Gradio SDK is available: 6.26.0

Upgrade
metadata
title: BERT CryptoTalk
emoji: πŸ“ˆ
colorFrom: gray
colorTo: yellow
sdk: gradio
sdk_version: 6.14.0
app_file: app.py
pinned: false
license: mit
short_description: BERT-CryptoTalk
hf_oauth: true
hf_oauth_scopes:
  - inference-api

πŸͺ™ CryptoBERT Gradio Inference App

A clean, modern Gradio interface for CryptoBERT, a fine-tuned BERT model for cryptocurrency-related text classification β€” complete with Hugging Face authentication management, dynamic token updates, and integrated sample dataset previews.


πŸ“¦ Features

βœ… CryptoBERT Text Classification
βœ… Gradio UI with Sidebar & Tabs
βœ… Dynamic Hugging Face Token Authentication
βœ… Secure Token Management with .env Support
βœ… Sample Dataset Preview (AG News)
βœ… Structured, Testable Python Codebase
βœ… PEP 8 & Security Best Practices
βœ… Unit Testing Included


πŸ“Έ Demo Preview

demo-preview


πŸš€ Quickstart

1️⃣ Clone the Repository

git clone https://github.com/your-username/crypto-bert-inference.git
cd crypto-bert-inference

2️⃣ Install Dependencies

pip install -r requirements.txt

3️⃣ Configure Environment Variables

Create a .env file:

cp .env.example .env

Edit .env:

HUGGINGFACE_TOKEN=your_huggingface_token_here

4️⃣ Launch the App

python app.py

The Gradio interface will open in your browser.


πŸ“Š Usage

πŸ” Authenticate with Hugging Face

  • Enter your Hugging Face token in the sidebar
  • Click Set Token to authenticate dynamically

πŸ“ Run Crypto Sentiment Inference

  • Switch to the CryptoTalk Inference tab
  • Enter cryptocurrency-related text
  • Click Predict to view sentiment predictions

πŸ“– View Sample Dataset

  • The sidebar displays a preview sample from the AG News dataset for demo purposes

πŸ—‚οΈ Project Structure

crypto-bert-inference/
β”œβ”€β”€ app.py
β”œβ”€β”€ pipeline_utils.py
β”œβ”€β”€ .env
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ tests/
β”‚   └── test_app.py
└── README.md

πŸ§ͺ Run Unit Tests

python -m unittest discover tests

πŸ“š Dependencies


πŸ“– Documentation


πŸ’‘ Future Enhancements

  • 🐳 Dockerized deployment
  • πŸ“ˆ Inference result charting
  • 🌐 Web-hosted demo on Hugging Face Spaces

πŸ›‘οΈ Security Considerations

  • Tokens are stored securely via environment variables
  • No plaintext token persistence or hardcoding
  • Input validation handled by Transformers pipelines
  • Isolated inference processes

πŸ“œ License

MIT Β© [Canstralian(https://github.com/canstralian)


πŸ–₯️ Author

[Your Name] β€” Cybersecurity & AI Developer
GitHub | LinkedIn