ammar00200 commited on
Commit
7baf096
·
verified ·
1 Parent(s): 5c2085f

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -47
app.py DELETED
@@ -1,47 +0,0 @@
1
- import streamlit as st
2
- import numpy as np
3
- import tensorflow as tf
4
-
5
- # Load the TFLite model
6
- model_path = "Overall_recommendation_model.tflite" # Adjust the path accordingly
7
- interpreter = tf.lite.Interpreter(model_path=model_path)
8
- interpreter.allocate_tensors()
9
-
10
- # Define a function to make predictions
11
- def predict(banq_name):
12
- input_details = interpreter.get_input_details()
13
- output_details = interpreter.get_output_details()
14
-
15
- # Preprocess the input (if necessary)
16
- # For example, convert banq_name to the format expected by the model
17
-
18
- # Set the input tensor
19
- interpreter.set_tensor(input_details[0]['index'], np.array([banq_name], dtype=np.str))
20
-
21
- # Run inference
22
- interpreter.invoke()
23
-
24
- # Get the output tensor
25
- output_data = interpreter.get_tensor(output_details[0]['index'])
26
-
27
- # Postprocess the output (if necessary)
28
- # For example, convert the output to human-readable format
29
-
30
- return output_data
31
-
32
- # Streamlit UI
33
- st.title("Banquet Recommendation App")
34
-
35
- # Input field for the banquet name
36
- banq_name = st.text_input("Enter the banquet name:")
37
-
38
- # Button to trigger prediction
39
- if st.button("Recommend"):
40
- # Make prediction
41
- recommendation = predict(banq_name)
42
-
43
- # Display recommendation
44
- st.write("Recommended banquet halls:")
45
- for hall in recommendation:
46
- st.write("- ", hall)
47
-