PyaeSoneK commited on
Commit
e421c6f
·
1 Parent(s): 5f16868

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -3
app.py CHANGED
@@ -1,5 +1,16 @@
1
-
2
  import streamlit as st
 
 
 
 
 
 
 
 
3
 
4
- x = st.slider('Select a value')
5
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
1
  import streamlit as st
2
+ from langchain.embeddings import OpenAIEmbeddings
3
+
4
+ # Load model from HF Spaces
5
+ model = OpenAIEmbeddings(model_name="PyaeSoneK/legalQAcustom")
6
+
7
+ # Streamlit UI
8
+ st.header("Seon's Legal QA for Dummies")
9
+ input_text = st.text_input("Give me your wildest legal thoughts:")
10
 
11
+ if st.button("Generate"):
12
+ # Get embeddings
13
+ embeddings = model(input_text)
14
+
15
+ # Display results
16
+ st.write(embeddings)