File size: 990 Bytes
405d419
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import streamlit as st
from langchain.prompts import PromptTemplate
from langchain.llms import CTransformers

##function to get response from LLAma 2 model

def getLLamaresponse(input_text,no_words,blog_style):
    ##LLama 2model






st.set_page_config(page_title="Generate Blogs",
                  page_icon='πŸ™‚?',
                  layout='centered',
                  initial_sidebar_state='collapsed')

st.head("Generate Blogs πŸ™‚")

input_text=st.text_input("Enter the Blog Topic")

#creating 2more columns for additional 2 fields
col1,col2=st.columns([5,5])

with col1:
    no_words=st.text_input('No of Words')
with col3:
    blog_style=st.selectbox('Writing the blog for',
                            ('Reseachers',
                             'Data Scientists',
                             'Common People'),
                            index=0)
    
submit=st.button("Generate")  

##final response
if submit:
    st.write(getLLamaresponse(input_text,no_words,blog_style))