Spaces:
Sleeping
Sleeping
doc_bot
Browse files
app.py
CHANGED
@@ -7,11 +7,22 @@ demo = gr.Blocks()
|
|
7 |
|
8 |
title = "El_Professor"
|
9 |
description = """
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
"""
|
14 |
|
|
|
15 |
demo1 = gr.Interface(
|
16 |
run,
|
17 |
[gr.Audio(sources=["microphone"], type="numpy"), gr.Image(
|
@@ -46,15 +57,21 @@ demo3 = gr.ChatInterface(
|
|
46 |
),
|
47 |
],
|
48 |
)
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
with demo:
|
59 |
gr.TabbedInterface([demo1, demo2, demo3, demo4], [
|
60 |
"Microphone", "Audio File", "general_Chatbot", "Document_Chatbot"])
|
|
|
7 |
|
8 |
title = "El_Professor"
|
9 |
description = """
|
10 |
+
**El_Professor: Enhance Text Extraction from Images with Audio Transcription**
|
11 |
+
|
12 |
+
**How to Use:**
|
13 |
+
|
14 |
+
1. **Record Yourself**: Begin by recording yourself speaking the content that corresponds to the text in the image. Ensure your pronunciation is clear and matches the text.
|
15 |
+
|
16 |
+
2. **Upload Recorded Audio**: After recording, upload the audio file containing your speech. This audio will be used to enhance text extraction from the image.
|
17 |
+
|
18 |
+
3. **Upload Image**: Next, upload the image containing the text you want to extract. Ensure the text in the image is visible and clear.
|
19 |
+
|
20 |
+
4. **Check Your Advancement**: Once both the audio and image are uploaded, the application processes them to enhance text extraction. The output will display the processed image with highlighted text regions, showing your advancement in aligning spoken words with written text.
|
21 |
+
|
22 |
+
**Note:** This application aims to assist you in improving your ability to accurately transcribe spoken words from images. It may not provide perfect results in all cases, but it can help you track your progress and refine your transcription skills over time.
|
23 |
"""
|
24 |
|
25 |
+
|
26 |
demo1 = gr.Interface(
|
27 |
run,
|
28 |
[gr.Audio(sources=["microphone"], type="numpy"), gr.Image(
|
|
|
57 |
),
|
58 |
],
|
59 |
)
|
60 |
+
|
61 |
+
demo4 = gr.Interface(
|
62 |
+
fn=Qa,
|
63 |
+
inputs=[
|
64 |
+
gr.Image(type="filepath", label="Upload Document"),
|
65 |
+
gr.Textbox(label="Question"),
|
66 |
+
gr.Checkbox(label="Enable Internet Access")
|
67 |
+
],
|
68 |
+
outputs=[
|
69 |
+
gr.Textbox(label="Answer"),
|
70 |
+
gr.Textbox(label="Conversations", type="text")
|
71 |
+
],
|
72 |
+
title="Document-based Chatbot",
|
73 |
+
description="This chatbot allows you to upload a document and ask questions. It can provide answers based on the content of the document as well as access information from the internet if enabled."
|
74 |
+
)
|
75 |
with demo:
|
76 |
gr.TabbedInterface([demo1, demo2, demo3, demo4], [
|
77 |
"Microphone", "Audio File", "general_Chatbot", "Document_Chatbot"])
|