ZennyKenny commited on
Commit
471fe5d
·
verified ·
1 Parent(s): 0fd8a0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -5
app.py CHANGED
@@ -50,13 +50,25 @@ def extract_text(image):
50
 
51
  return result
52
 
53
- # Create Gradio interface
54
  note = gr.Interface(
55
  fn=extract_text,
56
- inputs=gr.Image(type="filepath", label="Upload Image"),
57
- outputs=gr.Textbox(label="Extracted Text"),
58
- title="Handwritten Text Extractor",
59
- description="Upload an image containing handwritten text to extract its content.",
 
 
 
 
 
 
 
 
 
 
 
 
60
  )
61
 
62
  # Launch the app
 
50
 
51
  return result
52
 
53
+ # Create Gradio interface with a more colorful and engaging UI
54
  note = gr.Interface(
55
  fn=extract_text,
56
+ inputs=gr.Image(type="filepath", label="📷 Upload Image"),
57
+ outputs=gr.Textbox(label="📝 Extracted Text"),
58
+ title="🖋️ Handwritten Text Extractor 🖋️",
59
+ description="""<div style="background-color: #f0f8ff; padding: 20px; border-radius: 10px;">
60
+ <h2 style="color: #333;">✨ Welcome to the Handwritten Text Extractor! ✨</h2>
61
+ <p style="color: #555;">Upload an image containing handwritten text, and let the magic happen! 🎩✨</p>
62
+ <p style="color: #555;">📌 <strong>Instructions:</strong></p>
63
+ <ul style="color: #555;">
64
+ <li>Click on the "Upload Image" button to select your image.</li>
65
+ <li>Wait a few seconds while the model processes the image.</li>
66
+ <li>Voilà! Your extracted text will appear below. 🎉</li>
67
+ </ul>
68
+ <p style="color: #555;">🖼️ <strong>Note:</strong> For best results, use clear and well-lit images.</p>
69
+ </div>""",
70
+ theme="soft",
71
+ allow_flagging="never"
72
  )
73
 
74
  # Launch the app