-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
45 lines (34 loc) · 1.39 KB
/
app.py
File metadata and controls
45 lines (34 loc) · 1.39 KB
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
42
43
44
45
import streamlit as st
from dotenv import load_dotenv
from src.transcription import transcribe_audio
from src.ticket_llm import draft_ticket_with_llm
from src.jira_format import to_markdown, to_json
load_dotenv()
st.set_page_config(page_title="Voice-to-JIRA (MVP)", page_icon="📝")
st.title("📝 Voice-to-JIRA (MVP)")
st.caption("Turn short voice notes into JIRA-ready tickets in under 30 seconds.")
audio_file = st.file_uploader("Upload a short .wav or .mp3 voice note", type=["wav", "mp3"])
with st.expander("Tips for best results"):
st.markdown(
"- Keep clips under 90s for MVP\n"
"- Speak task first, then context\n"
"- Mention priority (low/medium/high) if known\n"
"- Say 'bug' or 'feature' if relevant"
)
if st.button("Generate Ticket", disabled=audio_file is None):
if not audio_file:
st.warning("Please upload an audio file first.")
st.stop()
with st.spinner("Transcribing audio..."):
transcript = transcribe_audio(audio_file)
with st.spinner("Drafting ticket..."):
ticket = draft_ticket_with_llm(transcript)
st.subheader("Proposed Ticket")
st.code(to_markdown(ticket), language="markdown")
st.download_button(
"Download ticket.json",
data=to_json(ticket),
file_name="ticket.json",
mime="application/json"
)
st.success("Done! Copy/paste the markdown above into JIRA.")