Viisshhaall commited on
Commit
b82b28b
·
verified ·
1 Parent(s): 1fcf916

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -25
app.py DELETED
@@ -1,25 +0,0 @@
1
- import streamlit as st
2
- from transformers import pipeline
3
-
4
- # Load the pipeline for text generation
5
- generator = pipeline("text-generation", model="EleutherAI/gpt-neo-1.3B")
6
-
7
- # App UI starts here
8
- st.set_page_config(page_title="LangChain Demo", page_icon=":robot:")
9
- st.header("LangChain Demo")
10
-
11
- # Gets the user input
12
- def get_text():
13
- input_text = st.text_input("You: ", key="input")
14
- return input_text
15
-
16
- user_input = get_text()
17
-
18
- submit = st.button('Generate')
19
-
20
- # If generate button is clicked
21
- if submit:
22
- st.subheader("Answer:")
23
- # Generate response based on user input
24
- response = generator(user_input, max_length=50, do_sample=True)[0]['generated_text']
25
- st.write(response)