Spaces:
Sleeping
Sleeping
Commit
·
28ac025
1
Parent(s):
a38c567
CSS
Browse files
app.py
CHANGED
|
@@ -60,11 +60,24 @@ css="""
|
|
| 60 |
#micINP {
|
| 61 |
background-color: #FFCCCB;
|
| 62 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
"""
|
| 64 |
|
| 65 |
with gr.Blocks(css=css, theme='NoCrypt/miku') as demo:
|
| 66 |
-
gr.Markdown("## Ask Questions from Your Uploaded Documents")
|
| 67 |
-
file_input = gr.File(label="Upload Your File", file_types=['.pdf', '.txt', '.docx', '.csv', '.json', '.pptx', '.xml', '.xlsx'], file_count='multiple')
|
| 68 |
|
| 69 |
process_btn = gr.Button("Process Document")
|
| 70 |
status = gr.Textbox(label="Processing Status")
|
|
@@ -73,12 +86,12 @@ with gr.Blocks(css=css, theme='NoCrypt/miku') as demo:
|
|
| 73 |
|
| 74 |
with gr.Row():
|
| 75 |
text_question = gr.Textbox(placeholder="Type your question...", scale=9, show_label=False)
|
| 76 |
-
mic_btn = gr.Button("
|
| 77 |
|
| 78 |
audio_input = gr.Audio(sources=["microphone"], type="numpy", visible=False, label=None, elem_id="micINP")
|
| 79 |
|
| 80 |
-
submit_btn = gr.Button("Submit")
|
| 81 |
-
answer = gr.Markdown()
|
| 82 |
|
| 83 |
process_btn.click(upload_and_process, inputs=file_input, outputs=status)
|
| 84 |
mic_btn.click(show_audio, outputs=audio_input)
|
|
|
|
| 60 |
#micINP {
|
| 61 |
background-color: #FFCCCB;
|
| 62 |
}
|
| 63 |
+
|
| 64 |
+
#heading {
|
| 65 |
+
text-align: center;
|
| 66 |
+
color: #FFCCCB;
|
| 67 |
+
font-size: 30px;
|
| 68 |
+
font-weight: bold;
|
| 69 |
+
margin: 20px;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
#submit {
|
| 73 |
+
background-color: #FFCCCB;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
"""
|
| 77 |
|
| 78 |
with gr.Blocks(css=css, theme='NoCrypt/miku') as demo:
|
| 79 |
+
gr.Markdown("## Ask Questions from Your Uploaded Documents", elem_id="heading")
|
| 80 |
+
file_input = gr.File(label="Upload Your File", file_types=['.pdf', '.txt', '.docx', '.csv', '.json', '.pptx', '.xml', '.xlsx'], file_count='multiple', elem_id="input")
|
| 81 |
|
| 82 |
process_btn = gr.Button("Process Document")
|
| 83 |
status = gr.Textbox(label="Processing Status")
|
|
|
|
| 86 |
|
| 87 |
with gr.Row():
|
| 88 |
text_question = gr.Textbox(placeholder="Type your question...", scale=9, show_label=False)
|
| 89 |
+
mic_btn = gr.Button("🎙️", scale=1, elem_id="micbttn")
|
| 90 |
|
| 91 |
audio_input = gr.Audio(sources=["microphone"], type="numpy", visible=False, label=None, elem_id="micINP")
|
| 92 |
|
| 93 |
+
submit_btn = gr.Button("Submit", elem_id="submit")
|
| 94 |
+
answer = gr.Markdown(elem_id="answer")
|
| 95 |
|
| 96 |
process_btn.click(upload_and_process, inputs=file_input, outputs=status)
|
| 97 |
mic_btn.click(show_audio, outputs=audio_input)
|