Apoorva96nbd commited on
Commit
315e6ca
1 Parent(s): e127ac4

added app.py

Browse files
Files changed (2) hide show
  1. app.py +13 -0
  2. requirements.txt +3 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain_community.llms import Ollama
2
+ import streamlit as st
3
+
4
+ llm = Ollama(model="llama3:8b")
5
+
6
+ st.title("Chatbot using Llama3")
7
+
8
+ prompt = st.text_area("Enter your prompt:")
9
+
10
+ if st.button("Generate"):
11
+ if prompt:
12
+ with st.spinner("Generating response..."):
13
+ st.write_stream(llm.stream(prompt, stop=['<|eot_id|>']))
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ langchain
2
+ langchain_community
3
+ streamlit