martin8 commited on
Commit
38c9894
β€’
1 Parent(s): ddca2e2

Upload 2 files

Browse files
Files changed (2) hide show
  1. pages/Fine Tune.py +44 -0
  2. pages/Host & Deploy.py +42 -0
pages/Fine Tune.py ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import time
3
+
4
+ # Streamlit App
5
+ st.title("AI Model Fine-Tuning πŸ€–")
6
+
7
+ # Intro
8
+ st.write("""
9
+ Welcome to the AI model fine-tuning! Here, we'll take a vanilla AI model and
10
+ follow the fine-tuning process to adapt it for a specific task. Let's get started!
11
+ """)
12
+
13
+ # Select model type
14
+ model_type = st.selectbox("Choose a vanilla AI model:", ["BERT", "LLaMa 2", "ResNet", "Transformer"])
15
+ st.write(f"You've selected the {model_type} model!")
16
+
17
+ # Specify dataset
18
+ dataset_name = st.text_input("Enter the name of the dataset for fine-tuning:", "Knowledgebase-Dataset.csv")
19
+ if dataset_name:
20
+ st.write(f"We will use the {dataset_name} dataset for fine-tuning!")
21
+
22
+ # Button to start the fine-tuning
23
+ if st.button("Start Fine-Tuning"):
24
+ st.write("Fine-tuning started... Please wait!")
25
+
26
+ # Simulate progress bar for fine-tuning
27
+ latest_iteration = st.empty()
28
+ bar = st.progress(0)
29
+ for i in range(100):
30
+ # Update the progress bar with each iteration.
31
+ latest_iteration.text(f"Fine-tuning progress: {i+1}%")
32
+ bar.progress(i + 1)
33
+ time.sleep(0.35)
34
+
35
+ st.write("Fine-tuning completed! Your model is now ready to deploy πŸš€")
36
+
37
+ # Sidebar for additional settings (pretend parameters)
38
+ st.sidebar.title("Fine-Tuning Settings")
39
+ learning_rate = st.sidebar.slider("Learning Rate:", 0.001, 0.1, 0.01, 0.001)
40
+ batch_size = st.sidebar.slider("Batch Size:", 8, 128, 32)
41
+ epochs = st.sidebar.slider("Number of Epochs:", 1, 10, 3)
42
+ st.sidebar.write(f"Learning Rate: {learning_rate}")
43
+ st.sidebar.write(f"Batch Size: {batch_size}")
44
+ st.sidebar.write(f"Epochs: {epochs}")
pages/Host & Deploy.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import time
3
+
4
+ # Streamlit App
5
+ st.title("AI Model Deployment πŸš€")
6
+
7
+ # Intro
8
+ st.write("""
9
+ Welcome to the AI model deployment flow! Here, we'll follow the process of deploying
10
+ your fine-tuned AI model to one of the cloud instances. Let's begin!
11
+ """)
12
+
13
+ # Select cloud provider
14
+ cloud_provider = st.selectbox("Choose a cloud provider:", ["AWS EC2", "Google Cloud VM", "Azure VM"])
15
+ st.write(f"You've selected {cloud_provider}!")
16
+
17
+ # Specify model details
18
+ model_name = st.text_input("Enter your AI model name:", "MySpecialModel")
19
+ if model_name:
20
+ st.write(f"We'll deploy the model named: {model_name}")
21
+
22
+ # Button to start the deployment
23
+ if st.button("Start Deployment"):
24
+ st.write("Deployment started... Please wait!")
25
+
26
+ # Simulate progress bar for deployment
27
+ latest_iteration = st.empty()
28
+ bar = st.progress(0)
29
+ for i in range(100):
30
+ # Update the progress bar with each iteration.
31
+ latest_iteration.text(f"Deployment progress: {i+1}%")
32
+ bar.progress(i + 1)
33
+ time.sleep(0.05)
34
+
35
+ st.write(f"Deployment completed! Your model {model_name} is now live on {cloud_provider} 🌐")
36
+
37
+ # Sidebar for additional settings (pretend configurations)
38
+ st.sidebar.title("Deployment Settings")
39
+ instance_type = st.sidebar.selectbox("Instance Type:", ["Standard", "High Memory", "High CPU", "GPU"])
40
+ storage_option = st.sidebar.slider("Storage Size (in GB):", 10, 500, 50)
41
+ st.sidebar.write(f"Instance Type: {instance_type}")
42
+ st.sidebar.write(f"Storage Size: {storage_option} GB")