Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -25,30 +25,36 @@ def gemini_model(input_text,no_of_words,blog_style):
|
|
25 |
return response.content
|
26 |
|
27 |
|
28 |
-
st.set_page_config(page_title="Blog Generator", initial_sidebar_state="collapsed", layout="centered")
|
29 |
|
30 |
-
# Header
|
31 |
-
st.title("📝 Generate Blog")
|
32 |
|
33 |
-
# Input Section
|
34 |
-
input_text = st.text_input("🔍 Enter the topic of the blog you want to generate")
|
35 |
|
36 |
-
# Creating 2 columns for additional 2 fields
|
37 |
-
col1, col2 = st.columns([2, 2])
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
44 |
with col2:
|
45 |
-
blog_style
|
|
|
|
|
46 |
|
47 |
# Generate Button
|
48 |
submit_button = st.button("♛ Generate Blog ")
|
49 |
|
50 |
# Display the generated blog on button click
|
51 |
if submit_button:
|
52 |
-
st.success("
|
53 |
generated_blog = gemini_model(input_text, no_of_words, blog_style)
|
54 |
st.write(generated_blog)
|
|
|
25 |
return response.content
|
26 |
|
27 |
|
28 |
+
# st.set_page_config(page_title="Blog Generator", initial_sidebar_state="collapsed", layout="centered")
|
29 |
|
|
|
|
|
30 |
|
|
|
|
|
31 |
|
|
|
|
|
32 |
|
33 |
+
st.set_page_config(page_title="Lets Generate Blogs",
|
34 |
+
page_icon='♛ ',
|
35 |
+
layout='centered',
|
36 |
+
initial_sidebar_state='collapsed')
|
37 |
+
|
38 |
+
st.header("Lets Generate Blogs Together ♛ ")
|
39 |
+
|
40 |
+
input_text=st.text_input("Enter the Blog Topic")
|
41 |
|
42 |
+
## creating to more columns for additonal 2 fields
|
43 |
+
|
44 |
+
col1,col2=st.columns([2,2])
|
45 |
+
|
46 |
+
with col1:
|
47 |
+
no_words=st.text_input('No of Words')
|
48 |
with col2:
|
49 |
+
blog_style=st.selectbox('♛ Writing the blog for',
|
50 |
+
('Kids - 5 Year olds','Grad Students','Researchers','Data Scientist','Common People'),index=0)
|
51 |
+
|
52 |
|
53 |
# Generate Button
|
54 |
submit_button = st.button("♛ Generate Blog ")
|
55 |
|
56 |
# Display the generated blog on button click
|
57 |
if submit_button:
|
58 |
+
st.success("**Generated Blog:**")
|
59 |
generated_blog = gemini_model(input_text, no_of_words, blog_style)
|
60 |
st.write(generated_blog)
|