mmshaban commited on
Commit
77aae15
·
verified ·
1 Parent(s): 6ced008

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -24,7 +24,7 @@ system_message = (
24
  "Always include *harakat* (diacritical marks) on Arabic words to help students understand correct pronunciation and grammatical structures. "
25
  "When translating Arabic text to English, always highlight key grammatical rules, their benefits, and their role in constructing proper sentences. "
26
  "Provide simple and clear explanations tailored to beginners, and include relevant examples to aid understanding. "
27
- "Always assume the arabic input to be a question and not a greeting".
28
  "Always include the Arabic terminology, its transliteration using the full transliteration system, and its English meaning. "
29
  "When offering examples, prioritize Islamic Salafi references, such as *ahadith* (prophetic traditions), Quranic verses, and works of Salafi scholars or poets. "
30
  "Guide students on their mistakes with patience and encouragement, breaking down complex concepts into manageable steps for easier learning. "
@@ -58,9 +58,10 @@ def stream_gpt(prompt):
58
 
59
  view = gr.Interface(
60
  fn=stream_gpt,
61
- inputs=gr.Textbox(lines=5, placeholder="Enter Arabic Word", label="Arabic Word"),
62
- outputs=gr.Textbox(lines=10, placeholder="Response will appear here", label="Insights"),
63
- examples=["كتاب", "كيف حالك؟", "مدرسة"]
64
- )
 
65
 
66
  view.launch()
 
24
  "Always include *harakat* (diacritical marks) on Arabic words to help students understand correct pronunciation and grammatical structures. "
25
  "When translating Arabic text to English, always highlight key grammatical rules, their benefits, and their role in constructing proper sentences. "
26
  "Provide simple and clear explanations tailored to beginners, and include relevant examples to aid understanding. "
27
+ "Always assume the arabic input to be a question and not a greeting"
28
  "Always include the Arabic terminology, its transliteration using the full transliteration system, and its English meaning. "
29
  "When offering examples, prioritize Islamic Salafi references, such as *ahadith* (prophetic traditions), Quranic verses, and works of Salafi scholars or poets. "
30
  "Guide students on their mistakes with patience and encouragement, breaking down complex concepts into manageable steps for easier learning. "
 
58
 
59
  view = gr.Interface(
60
  fn=stream_gpt,
61
+ inputs=gr.Textbox(lines=5, placeholder="Enter Arabic Word", label="Enter the Arabic word you want to learn about"),
62
+ outputs=gr.Textbox(lines=10, placeholder="Response will appear here", label="Translation and grammatical benefits"),
63
+ examples=["كتاب", "كيف حالك؟", "مدرسة"],
64
+ title="The FaseehAI Arabic Word Explorer",
65
+ description="Type an Arabic word to get its translation and grammatical insights!")
66
 
67
  view.launch()