Wazzever commited on
Commit
8a0ef97
·
verified ·
1 Parent(s): 694a2a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -2
app.py CHANGED
@@ -1,4 +1,20 @@
1
  import streamlit as st
 
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+ from langchain_groq import ChatGroq
3
 
4
+ st.title("🦜🔗 Quickstart App")
5
+
6
+ # Form to collect user input
7
+ with st.form("my_form"):
8
+ text = st.text_area(
9
+ "Enter text:",
10
+ "What are the three key pieces of advice for learning how to code?",
11
+ )
12
+ submitted = st.form_submit_button("Submit")
13
+
14
+ if submitted:
15
+ # Instantiate and use the ChatGroq model
16
+ model = ChatGroq(model="llama-3.1-70b-versatile")
17
+ response = model.invoke(text)
18
+
19
+ # Display the response in the Streamlit app
20
+ st.info(response)