Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,22 @@
|
|
1 |
import streamlit as st
|
2 |
-
import re,
|
3 |
-
|
4 |
from huggingface_hub import login, InferenceClient
|
5 |
-
import
|
|
|
|
|
|
|
6 |
|
7 |
login(token=os.getenv("TOKEN"))
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
# Initialize the inference client for the Mixtral model
|
10 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
11 |
|
|
|
1 |
import streamlit as st
|
2 |
+
import re, ast
|
3 |
+
import pandas as pd
|
4 |
from huggingface_hub import login, InferenceClient
|
5 |
+
import pickle
|
6 |
+
from sklearn.metrics.pairwise import cosine_similarity
|
7 |
+
|
8 |
+
st.set_page_config(layout="wide")
|
9 |
|
10 |
login(token=os.getenv("TOKEN"))
|
11 |
|
12 |
+
with open('l.pkl', 'rb') as file:
|
13 |
+
similarity = pickle.load(file)
|
14 |
+
|
15 |
+
with open('items_dict.pkl', 'rb') as file:
|
16 |
+
items_dict = pickle.load(file)
|
17 |
+
|
18 |
+
data=pd.read_csv('marketing_sample_for_walmart_com-product_details__20200101_20200331__30k_data.csv')
|
19 |
+
|
20 |
# Initialize the inference client for the Mixtral model
|
21 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
22 |
|