sajalmadan0909 commited on
Commit
6952bc9
Β·
verified Β·
1 Parent(s): 2e5bf9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -6
app.py CHANGED
@@ -185,7 +185,7 @@ def complete_address_interface(partial_address):
185
  return "❌ Model not loaded. Please check the logs."
186
 
187
  result = llama_system.complete_partial_address(partial_address)
188
- return f"**Partial Address:** {partial_address}\n\n**Completed Address:**\n{result}"
189
 
190
  def standardize_address_interface(address_text):
191
  """Interface function for address standardization"""
@@ -193,7 +193,7 @@ def standardize_address_interface(address_text):
193
  return "❌ Model not loaded. Please check the logs."
194
 
195
  result = llama_system.standardize_address(address_text)
196
- return f"**Original:** {address_text}\n\n**Standardized:**\n{result}"
197
 
198
  # Sample data
199
  sample_addresses = [
@@ -224,13 +224,16 @@ with gr.Blocks(title="Llama Address Intelligence", theme=gr.themes.Soft()) as de
224
  gr.Markdown("""
225
  # πŸ¦™ Llama 3.2-1B Address Intelligence
226
 
227
- Powered by a fine-tuned Llama 3.2-1B model specialized for Indian address processing. This lightweight model can extract components, complete partial addresses, and standardize informal address formats.
 
 
 
228
 
229
  **Model:** [shiprocket-ai/open-llama-1b-address-completion](https://huggingface.co/shiprocket-ai/open-llama-1b-address-completion)
230
  """)
231
 
232
  with gr.Tab("πŸ“‹ Extract Components"):
233
- gr.Markdown("Extract structured components from complete addresses")
234
  with gr.Row():
235
  with gr.Column(scale=1):
236
  extract_input = gr.Textbox(
@@ -265,7 +268,7 @@ with gr.Blocks(title="Llama Address Intelligence", theme=gr.themes.Soft()) as de
265
  )
266
 
267
  with gr.Tab("✨ Complete Address"):
268
- gr.Markdown("Complete partial or incomplete addresses using AI")
269
  with gr.Row():
270
  with gr.Column(scale=1):
271
  complete_input = gr.Textbox(
@@ -300,7 +303,7 @@ with gr.Blocks(title="Llama Address Intelligence", theme=gr.themes.Soft()) as de
300
  )
301
 
302
  with gr.Tab("πŸ“ Standardize Format"):
303
- gr.Markdown("Convert informal or messy addresses into proper standardized format")
304
  with gr.Row():
305
  with gr.Column(scale=1):
306
  standardize_input = gr.Textbox(
@@ -363,6 +366,13 @@ with gr.Blocks(title="Llama Address Intelligence", theme=gr.themes.Soft()) as de
363
  - **Road Names**: Streets, lanes, main roads
364
  - **Landmarks**: Notable reference points
365
 
 
 
 
 
 
 
 
366
  ### Use Cases
367
  - **E-commerce**: Auto-complete checkout addresses
368
  - **Forms**: Intelligent address suggestions
 
185
  return "❌ Model not loaded. Please check the logs."
186
 
187
  result = llama_system.complete_partial_address(partial_address)
188
+ return f"**Partial Address:** {partial_address}\n\n**Completed Address:**\n{result}\n\n*⚠️ Note: This feature has limited training data and results may vary in quality.*"
189
 
190
  def standardize_address_interface(address_text):
191
  """Interface function for address standardization"""
 
193
  return "❌ Model not loaded. Please check the logs."
194
 
195
  result = llama_system.standardize_address(address_text)
196
+ return f"**Original:** {address_text}\n\n**Standardized:**\n{result}\n\n*⚠️ Note: This feature has limited training data and results may vary in quality.*"
197
 
198
  # Sample data
199
  sample_addresses = [
 
224
  gr.Markdown("""
225
  # πŸ¦™ Llama 3.2-1B Address Intelligence
226
 
227
+ Powered by a fine-tuned Llama 3.2-1B model specialized for Indian address processing.
228
+
229
+ **⭐ Best Performance**: Entity extraction from complete addresses
230
+ **⚠️ Limited Performance**: Address completion and standardization (limited training data)
231
 
232
  **Model:** [shiprocket-ai/open-llama-1b-address-completion](https://huggingface.co/shiprocket-ai/open-llama-1b-address-completion)
233
  """)
234
 
235
  with gr.Tab("πŸ“‹ Extract Components"):
236
+ gr.Markdown("⭐ **BEST PERFORMANCE** - Extract structured components from complete addresses")
237
  with gr.Row():
238
  with gr.Column(scale=1):
239
  extract_input = gr.Textbox(
 
268
  )
269
 
270
  with gr.Tab("✨ Complete Address"):
271
+ gr.Markdown("⚠️ **EXPERIMENTAL** - Complete partial addresses (limited training data - results may vary)")
272
  with gr.Row():
273
  with gr.Column(scale=1):
274
  complete_input = gr.Textbox(
 
303
  )
304
 
305
  with gr.Tab("πŸ“ Standardize Format"):
306
+ gr.Markdown("⚠️ **EXPERIMENTAL** - Convert informal addresses to standardized format (limited training data - results may vary)")
307
  with gr.Row():
308
  with gr.Column(scale=1):
309
  standardize_input = gr.Textbox(
 
366
  - **Road Names**: Streets, lanes, main roads
367
  - **Landmarks**: Notable reference points
368
 
369
+ ### Performance Notes
370
+ - **⭐ Entity Extraction**: Excellent performance - primary use case
371
+ - **⚠️ Address Completion**: Limited training data - experimental feature
372
+ - **⚠️ Format Standardization**: Limited training data - experimental feature
373
+
374
+ **Recommendation**: Use this model primarily for address component extraction.
375
+
376
  ### Use Cases
377
  - **E-commerce**: Auto-complete checkout addresses
378
  - **Forms**: Intelligent address suggestions