Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ model = tf.keras.Sequential([
|
|
14 |
])
|
15 |
|
16 |
# Compile the model with the Adam optimizer and loss function
|
17 |
-
model.compile(optimizer=tf.keras.optimizers.Adam(0.
|
18 |
|
19 |
# Training data (Celsius to Fahrenheit)
|
20 |
celsius = np.array([-40, -10, 0, 8, 15, 22, 38], dtype=float)
|
@@ -27,7 +27,7 @@ input_celsius = st.number_input('Enter Celsius value:', value=0.0, format="%.1f"
|
|
27 |
if st.button('Train Model and Predict Fahrenheit'):
|
28 |
with st.spinner('Training...'):
|
29 |
# Fit the model
|
30 |
-
history = model.fit(celsius, fahrenheit, epochs=
|
31 |
st.success('Training completed!')
|
32 |
|
33 |
# Make prediction
|
|
|
14 |
])
|
15 |
|
16 |
# Compile the model with the Adam optimizer and loss function
|
17 |
+
model.compile(optimizer=tf.keras.optimizers.Adam(0.7), loss='mean_squared_error')
|
18 |
|
19 |
# Training data (Celsius to Fahrenheit)
|
20 |
celsius = np.array([-40, -10, 0, 8, 15, 22, 38], dtype=float)
|
|
|
27 |
if st.button('Train Model and Predict Fahrenheit'):
|
28 |
with st.spinner('Training...'):
|
29 |
# Fit the model
|
30 |
+
history = model.fit(celsius, fahrenheit, epochs=500)
|
31 |
st.success('Training completed!')
|
32 |
|
33 |
# Make prediction
|