Commit ·
46828da
1
Parent(s): 6d4b56b
Updated descriptive stuff
Browse files55 unmodified lines5657585960616220 unmodified lines838485868788899091929394959697989910010110210310410510610710810911011111211311411511655 unmodified linesft_diff_text = diff_texts(selected_quote,ft_result['text'])return base_diff_txt, ft_diff_textexcept Exception as e:20 unmodified linesreturn barry_quotes[rand_idx]with gr.Blocks() as demo:selected_quote = gr.State([])gr.Markdown("Barryoke")quote = gr.Textbox()rand_btn = gr.Button("Quote")rand_btn.click(fn=select_quote,inputs=[],outputs=quote)with gr.Row():mf_input = gr.Audio(sources='microphone',type="filepath"),out_1 = gr.HighlightedText(label="WhisperDiff",combine_adjacent=True,show_legend=True,color_map={"+": "green", "-": "blue"})out_2 = gr.HighlightedText(label="FinetuneDiff",combine_adjacent=True,show_legend=True,color_map={"+": "green", "-": "blue"})btn = gr.Button("Run")btn.click(fn=transcribe, inputs=mf_input, outputs=[out_1, out_2])demo.launch()55 unmodified lines5657585960616220 unmodified lines838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412555 unmodified linesft_diff_text = diff_texts(selected_quote,ft_result['text'])return base_result, base_diff_txt, ft_result, ft_diff_textexcept Exception as e:20 unmodified linesreturn barry_quotes[rand_idx]descriptive_markdown = """# BarryokeQuotes taken from an address given by Sir Redmond Barry on the opening of the free public library of Ballarat East.See the full address here - [https://latrobejournal.slv.vic.gov.au/latrobejournal/issue/latrobe-26/t1-g-t3.html](https://latrobejournal.slv.vic.gov.au/latrobejournal/issue/latrobe-26/t1-g-t3.html)"""with gr.Blocks() as demo:selected_quote = gr.State([])gr.Markdown(descriptive_markdown)quote = gr.Textbox()rand_btn = gr.Button("Pick a quote")rand_btn.click(fn=select_quote,inputs=[],outputs=quote)with gr.Row():mf_input = gr.Audio(sources='microphone',type="filepath"),out_1 = gr.Textbox()diff_out_1 = gr.HighlightedText(label="WhisperDiff",combine_adjacent=True,show_legend=True,color_map={"+": "green", "-": "blue"})out_2 = gr.Textbox()diff_out_2 = gr.HighlightedText(label="FinetuneDiff",combine_adjacent=True,show_legend=True,color_map={"+": "green", "-": "blue"})btn = gr.Button("Run")btn.click(fn=transcribe, inputs=mf_input, outputs=[out_1, diff_out_1, out_2, diff_out_2])demo.launch()
app.py+15-6