chaouch commited on
Commit
8025b16
·
verified ·
1 Parent(s): a4cd565

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -11,7 +11,7 @@ description = """
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
 
@@ -21,7 +21,7 @@ description = """
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,
@@ -37,7 +37,8 @@ demo2 = gr.Interface(
37
  type="filepath", label="Image")],
38
  [gr.Image(type="pil", label="output Image")],
39
  title=title,
40
- description=description
 
41
  )
42
  demo3 = gr.ChatInterface(
43
  respond,
@@ -70,10 +71,11 @@ demo4 = gr.Interface(
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"])
78
  if __name__ == "__main__":
79
  demo.launch()
 
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. .
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
 
 
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
+ im = "the-king-and-three-sisters-around-the-world-stories-for-children.png"
25
 
26
  demo1 = gr.Interface(
27
  run,
 
37
  type="filepath", label="Image")],
38
  [gr.Image(type="pil", label="output Image")],
39
  title=title,
40
+ description=description,
41
+ examples=[["Beginning.wav", im], ["Middels.wav", im]]
42
  )
43
  demo3 = gr.ChatInterface(
44
  respond,
 
71
  gr.Textbox(label="Conversations", type="text")
72
  ],
73
  title="Document-based Chatbot",
74
+ examples=[[im, "how many sisters in the story", False]],
75
  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."
76
  )
77
  with demo:
78
+ gr.TabbedInterface([demo2, demo4, demo1, demo3], [
79
+ "Audio File", " Document_Chatbot", " Microphone", "general_Chatbot"])
80
  if __name__ == "__main__":
81
  demo.launch()