fixed bug where header.html was not found

This commit is contained in:
Jaikinator
2023-09-22 18:12:08 +02:00
parent 9c6d183c89
commit 30141b9616
+6 -1
View File
@@ -33,6 +33,8 @@ Usage:
"""
import json
import os
from tkinter import CURRENT
import gradio as gr
from tqdm import tqdm
@@ -60,6 +62,8 @@ LANGUAGES = [
"Vietnamese", "Welsh"
]
CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
class GradioTranscriptionInterface:
"""
Interface handling the interaction between Gradio UI and the Audio Transcription system.
@@ -348,7 +352,8 @@ def gradio_Interface(model : Scraibe = None):
with gr.Blocks(theme=theme,title='ScrAIbe: Automatic Audio Transcription') as demo:
# Define components
header = open("header.html", "r").read()
hname = os.path.join(CURRENT_PATH, "header.html")
header = open(hname, "r").read()
gr.HTML(header, visible= True, show_label=False)
with gr.Row():