⚠
️ DEPRECATED GITLAB INSTANCE
⚠
️ This GitLab is now read-only for reference. Please use
https://gitlab.iauro.co
for all new work.
Migration completed on September 17, 2025
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
streamlit application
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GEN_AI_UPSKILLING_PROGRAM
streamlit application
Commits
171dbfdb
Commit
171dbfdb
authored
Jun 24, 2025
by
Rahul Sonawane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parent
5cfe8f05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
app.py
app.py
+51
-0
No files found.
app.py
0 → 100644
View file @
171dbfdb
import
streamlit
as
st
import
yfinance
as
yf
from
datetime
import
date
from
transformers
import
pipeline
@
st
.
cache_resource
def
get_summarizer
():
return
pipeline
(
"summarization"
,
model
=
"facebook/bart-large-cnn"
)
summarizer
=
get_summarizer
()
st
.
set_page_config
(
page_title
=
"Stock Dashboard & Summarizer"
,
layout
=
"wide"
)
st
.
title
(
" Stock Price Dashboard & Text Summarizer"
)
tab1
,
tab2
=
st
.
tabs
([
" Stock Visualization"
,
" Stock Text Summarization"
])
with
tab1
:
st
.
header
(
"Stock Price Dashboard"
)
ticker
=
st
.
text_input
(
"Enter Stock Ticker Symbol (e.g., AAPL, MSFT)"
,
"AAPL"
)
col1
,
col2
=
st
.
columns
(
2
)
with
col1
:
start_date
=
st
.
date_input
(
"Start Date"
,
date
(
2022
,
1
,
1
))
with
col2
:
end_date
=
st
.
date_input
(
"End Date"
,
date
.
today
())
if
st
.
button
(
"Fetch Stock Data"
):
data
=
yf
.
download
(
ticker
,
start
=
start_date
,
end
=
end_date
)
if
data
.
empty
:
st
.
error
(
"No data found. Please check the ticker symbol."
)
else
:
st
.
subheader
(
f
"Stock Data for {ticker.upper()}"
)
st
.
line_chart
(
data
[
'Close'
],
use_container_width
=
True
)
st
.
area_chart
(
data
[
'Volume'
],
use_container_width
=
True
)
with
tab2
:
st
.
header
(
"Summarize Stock-Related Text"
)
input_text
=
st
.
text_area
(
"Paste a stock news article or report below:"
,
height
=
300
)
if
st
.
button
(
"Summarize"
):
if
len
(
input_text
.
strip
())
<
100
:
st
.
warning
(
"Please provide a longer text (at least 100 characters)."
)
else
:
with
st
.
spinner
(
"Summarizing..."
):
summary
=
summarizer
(
input_text
,
max_length
=
130
,
min_length
=
30
,
do_sample
=
False
)
st
.
success
(
"Summary Generated:"
)
st
.
write
(
summary
[
0
][
'summary_text'
])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment