Downloads · 30 days
0
iiitbh18/bhaskar1
bhaskar1 is a machine learning model from iiitbh18. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for keras. The card lists the license as apache-2.0.
The above model is a simple neural network built using TensorFlow/Keras. It is designed to perform a regression task, which means it predicts continuous numeric values based on input features.
Downloads · 30 days
0
Access
Public
Updated Sep 3, 2024
Repo size
52.5 KB
Likes
0
Public
Click a slice to open those files.
.h523.9 KB · 86%
From the Hugging Face model README
The above model is a simple neural network built using TensorFlow/Keras. It is designed to perform a regression task, which means it predicts continuous numeric values based on input features.
This repository contains a Keras model trained for time series prediction.
The model is a simple neural network built using Keras. It is designed to perform regression tasks, predicting a numeric value from input features.
To use this model, follow the steps below:
Make sure you have the necessary libraries installed:
pip install tensorflow huggingface-hub pandas matplotlib
#load the model from the Hugging Face Hub:
import tensorflow as tf
from huggingface_hub import from_pretrained_keras
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# Load the model from Hugging Face Hub
model = from_pretrained_keras("iiitbh18/bhaskar1")
# Prepare Dummy Data
# Create a DataFrame with dummy data
dummy_data = {
'timestamp': [
'2024-08-07 02:43:28.788',
'2024-08-07 02:43:28.788',
'2024-08-07 02:43:43.788',
'2024-08-07 02:43:43.788',
'2024-08-07 02:43:58.788'
],
'value': [
99.00000005960464,
98.90000000596046,
98.70000004768372,
99.00000005960464,
98.89999993145466
]
}
df = pd.DataFrame(dummy_data)
#Prepare Data for Prediction
X_dummy = df['value'].values.reshape(-1, 1) # Reshape to match model's input shape
# Make Predictions
predictions = model.predict(X_dummy)
print("Predictions:", predictions)
#Visualize the Results
# Plot actual vs. predicted values
plt.figure(figsize=(10, 6))
plt.scatter(df['timestamp'], df['value'], color='blue', label='Actual Values')
plt.scatter(df['timestamp'], predictions, color='red', label='Predicted Values')
plt.xlabel('Timestamp')
plt.ylabel('Value')
plt.title('Actual vs Predicted Values')
plt.legend()
plt.xticks(rotation=45)
plt.show()