Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SinLingua Toolkit
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
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-118
SinLingua Toolkit
Commits
91923235
Commit
91923235
authored
Sep 03, 2023
by
SupunGurusinghe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated app
parent
047e8a77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
app.py
app.py
+8
-2
No files found.
app.py
View file @
91923235
import
os
from
flask
import
Flask
,
render_template
,
request
,
jsonify
from
sinlingua.singlish.rulebased_transliterator
import
RuleBasedTransliterator
from
sinlingua.grammar_rule.grammar_main
import
GrammarMain
# from sinlingua.summarizer.faster_longformer import FLongformerTextSummarizer
from
sinlingua.sinhala_audio.audio_to_text
import
conversion
from
flaskwebgui
import
FlaskUI
,
close_application
app
=
Flask
(
__name__
)
app
=
Flask
(
__name__
,
template_folder
=
"templates"
)
# ui = FlaskUI(app, width=500, height=500)
@
app
.
route
(
'/'
,
methods
=
[
'GET'
,
'POST'
])
...
...
@@ -42,6 +43,11 @@ def summarize():
return
render_template
(
'summarize.html'
)
@
app
.
route
(
"/close"
,
methods
=
[
"GET"
])
def
close_window
():
close_application
()
@
app
.
route
(
'/process'
,
methods
=
[
'POST'
])
def
process
():
input_text
,
audio_input
=
None
,
None
...
...
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