import gradio as gr
# HTML 위젯 코드. 실제 ``와 ``는 적절한 값으로 대체해야 합니다.
widget_html = """
"""
def show_widget():
# Gradio HTML 컴포넌트에 위젯 코드를 전달합니다.
return widget_html
css = """
.gradio button.gr-button:enabled {
display: none;
}
"""
iface = gr.Interface(
fn=show_widget,
inputs=[],
outputs=gr.HTML(label="Vapi Voice Widget"),
title="Vapi Voice Widget Integration Example",
description="This is an example of integrating the Vapi Voice Widget into a Gradio web app.",
live=True, # live 모드 활성화
css=css # CSS를 추가하여 "Generate" 버튼을 숨깁니다.
)
# 인터페이스 실행
iface.launch()