fixed bug where header.html was not found
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user