Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,8 +61,8 @@ def clear_transcript():
|
|
61 |
return ""
|
62 |
|
63 |
# Gradio UI Components
|
64 |
-
doc_image = gr.Image(label="\ud83d\udcd8 Extracted Document Image", show_label=True, elem_id="docimg", height=
|
65 |
-
chatbot = gr.Chatbot(label="\ud83e\udde0 Document Assistant", elem_id="chatbox", bubble_full_width=False)
|
66 |
prompt = gr.Textbox(placeholder="Ask about the document...", label="Ask about the document")
|
67 |
send_btn = gr.Button("Send")
|
68 |
|
@@ -73,11 +73,11 @@ clear_btn = gr.Button("Clear Transcript")
|
|
73 |
|
74 |
with gr.Blocks(theme=gr.themes.Base(), css="""
|
75 |
#docimg img { object-fit: contain !important; }
|
76 |
-
#chatbox {
|
77 |
.gr-box { border-radius: 12px; }
|
78 |
""") as demo:
|
79 |
|
80 |
-
gr.Markdown("# \ud83e\
|
81 |
with gr.Row():
|
82 |
with gr.Column(scale=1):
|
83 |
doc_image.render()
|
@@ -98,7 +98,4 @@ with gr.Blocks(theme=gr.themes.Base(), css="""
|
|
98 |
audio_in.stream(fn=send_audio_chunk_realtime, inputs=audio_in, outputs=live_transcript)
|
99 |
clear_btn.click(fn=clear_transcript, outputs=live_transcript)
|
100 |
|
101 |
-
demo.load(lambda: None, js="document.getElementById('docimg').scrollIntoView({ behavior: 'smooth', block: 'start' })")
|
102 |
-
|
103 |
demo.launch()
|
104 |
-
|
|
|
61 |
return ""
|
62 |
|
63 |
# Gradio UI Components
|
64 |
+
doc_image = gr.Image(label="\ud83d\udcd8 Extracted Document Image", show_label=True, elem_id="docimg", height=480, width=340)
|
65 |
+
chatbot = gr.Chatbot(label="\ud83e\udde0 Document Assistant", elem_id="chatbox", bubble_full_width=False, height=480)
|
66 |
prompt = gr.Textbox(placeholder="Ask about the document...", label="Ask about the document")
|
67 |
send_btn = gr.Button("Send")
|
68 |
|
|
|
73 |
|
74 |
with gr.Blocks(theme=gr.themes.Base(), css="""
|
75 |
#docimg img { object-fit: contain !important; }
|
76 |
+
#chatbox { border-radius: 10px; }
|
77 |
.gr-box { border-radius: 12px; }
|
78 |
""") as demo:
|
79 |
|
80 |
+
gr.Markdown("# \ud83e\uddd0 Document AI + \ud83c\udfa7 Voice Assistant")
|
81 |
with gr.Row():
|
82 |
with gr.Column(scale=1):
|
83 |
doc_image.render()
|
|
|
98 |
audio_in.stream(fn=send_audio_chunk_realtime, inputs=audio_in, outputs=live_transcript)
|
99 |
clear_btn.click(fn=clear_transcript, outputs=live_transcript)
|
100 |
|
|
|
|
|
101 |
demo.launch()
|
|