Ubuntu commited on
Commit
e3808d6
·
1 Parent(s): c8ef715

Remove max tokens slider and simplify interface

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -34,7 +34,6 @@ def respond(message, translation_choice):
34
  elif translation_choice == "English to Moroccan Arabic":
35
  return translate_eng_to_darija(message, direction="eng_to_darija")
36
 
37
-
38
  # Gradio Interface Layout with organized components
39
  with gr.Blocks() as demo:
40
  with gr.Row():
@@ -49,8 +48,16 @@ with gr.Blocks() as demo:
49
  Select the translation direction and type your text. <br>
50
  Get quick translations between **English** and **Moroccan Arabic (Darija)** or **Darija to Modern Standard Arabic (MSA)**! 🔥
51
  </p>
52
- <img src="https://moroccan-culture-image.s3.eu-north-1.amazonaws.com/2159558.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIAW3MD7RUI6BPOSTGF%2F20250225%2Feu-north-1%2Fs3%2Faws4_request&X-Amz-Date=20250225T213645Z&X-Amz-Expires=300&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEBUaCmV1LW5vcnRoLTEiSDBGAiEA2wC2GISJOKipdbfMelCGfMqoPHnVnM9aY0zmsgmINpACIQCkA5VvqMaCEHNVwJml3%2FBJu%2FQlrU120PByOy8dSEfkdSrqAwhPEAAaDDQ3MTExMjU4NDQ2NSIMosytLgjLE%2BjysHncKscD5SmK3%2FV7ycLFyJpg8GMUa2bi%2BB4Tlj4YLxW37IxScYWjA5dOLyc9NnJNQ87K73ZRJLFSv1sogcVvRQqOnq3Cjb1AQwtljD4MHBjPIpgy7QVBov%2BAdUMzehD7K%2FhL8ME2pLPMV70E12dSdRRpablepF3Y%2FrHU1S8s4HJ%2BDAmfEF6gmnexTRyXVIEYodn%2FqPtOR5oaUF17SGEmmKJBi4b2kLQN%2B353pYrkB8ciBn0gAScNVkkgs2PuDUmzcXtw%2F4qcASvZ%2F11za7YSO%2FPrK30tFrOuVQQgjaB2h4a5%2BETBuXdLDX6EkbnEmN2Rh2ZH0adBut2UnOR9AtR4lRHDtk7qnRrlof6byqCqjDHu9iaJVcBpNMojNo%2BFZMofqZrnKygggvCaJhI3a%2FmJo7v0moz0nRhljyCA18ieJ8PYIBwqGcc53MneKRBbyTrI%2F7lHimTQZ4RDiD8E42qyxyh5vYOOBd9ijYog%2FZEsvzzaLfQC1niWfT35NcpzNXn0QMp8vjHa3S57nV3vXY7uXqj7i6Hf0JGG8YrZ3bpizt3q%2FY1zSHc9RCrYALCmWm9xfXsxy4woC10vBTP9S9tYaKS1j60bOADWikoeemUw4Oj4vQY6kwKyzIUJZkcmGcdRVff6NtSS%2F7hCsUUtyoygbvXIudEFO2jQDChI%2Fx5YbO%2BPH3ynUKVjncXGmtWR7%2BoncsXjFg7xrzsYjBjmDuHWF1umN%2BnA%2FPng6CfJ%2Br%2BlI5VxjnZCAZsvbGEKp9xKSSUI9KXcdsOYC4sMzNm1NdzU3wuWPhlJHvv7Y6Ma%2FPQwUkfDCCBphGheYqiZrQieDLpcnI6TNiefFOzRipE27fbtJXwbzoXIIhlQdtML7LXsQq5XeISwXGRZjeIQo5bIF6ab5QpA%2BFcmvAiVQlAh%2Byqa2KMjZhVHiFxMcPZXb0lRO3y2lB40FGKbQ7SVyUrDJg6pE%2FF67NMhCkanOp34hhjZ4JlWbGcIeBTTPw%3D%3D&X-Amz-Signature=894ab5ded5a51c7c605a2cfa64e77f4e69692edc7401e4428441dcf0d43f9d3d&X-Amz-SignedHeaders=host&response-content-disposition=inline"
53
- style="width: 100px; display: block; margin: 20px auto;" alt="Dima Meghrib Logo" />
 
 
 
 
 
 
 
 
54
  """)
55
 
56
  with gr.Column():
@@ -78,3 +85,4 @@ demo.launch()
78
 
79
 
80
 
 
 
34
  elif translation_choice == "English to Moroccan Arabic":
35
  return translate_eng_to_darija(message, direction="eng_to_darija")
36
 
 
37
  # Gradio Interface Layout with organized components
38
  with gr.Blocks() as demo:
39
  with gr.Row():
 
48
  Select the translation direction and type your text. <br>
49
  Get quick translations between **English** and **Moroccan Arabic (Darija)** or **Darija to Modern Standard Arabic (MSA)**! 🔥
50
  </p>
51
+ <p style="text-align: center;">
52
+ This demo uses two advanced models:<br>
53
+ - **English to Moroccan Arabic (Darija)**<br>
54
+ - **Moroccan Arabic (Darija) to Modern Standard Arabic (MSA)**<br>
55
+ Choose your desired translation direction and get started!<br>
56
+ </p>
57
+ <p style="text-align: center;">
58
+ <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Flag_of_Morocco.svg/800px-Flag_of_Morocco.svg.png"
59
+ style="width: 150px; display: block; margin: 20px auto;" alt="Moroccan Flag" />
60
+ </p>
61
  """)
62
 
63
  with gr.Column():
 
85
 
86
 
87
 
88
+