Spaces:
Sleeping
A newer version of the Gradio SDK is available: 6.26.0
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
π 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 Tokento authenticate dynamically
π Run Crypto Sentiment Inference
- Switch to the
CryptoTalk Inferencetab - Enter cryptocurrency-related text
- Click
Predictto view sentiment predictions
π View Sample Dataset
- The sidebar displays a preview sample from the
AG Newsdataset 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
