Spaces:
Sleeping

qysb819 commited on
Commit
9b0cbde
·
verified ·
1 Parent(s): 038133f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -185,7 +185,19 @@ with gr.Blocks() as demo:
185
  inp.submit(respond, [chatbot, inp], [chatbot, inp])
186
  clear.click(lambda: ([], ""), [], [chatbot, inp])
187
 
188
- with gr.Tab("🤖 ذكاء عام (HF)"):
 
 
 
 
 
 
 
 
 
 
 
 
189
  gr.Markdown("## محادثة ذكاء اصطناعي عام (Hugging Face)")
190
 
191
  hf_token = gr.Textbox(label="ضع HuggingFace Token", type="password")
 
185
  inp.submit(respond, [chatbot, inp], [chatbot, inp])
186
  clear.click(lambda: ([], ""), [], [chatbot, inp])
187
 
188
+ with gr.Blocks() as demo:
189
+ with gr.Tab("المدرس (FSM)"):
190
+ gr.Markdown("## My AI Tutor (FSM)")
191
+ chatbot = gr.Chatbot(type="messages", height=420, show_copy_button=True)
192
+ inp = gr.Textbox(label="اكتب هنا", placeholder="مثال: 30 أو اسئلة أو بعده أو also أو ملخص أو قاعدة 2")
193
+ clear = gr.Button("Clear")
194
+
195
+ chatbot.value = [("", "\n".join(engine.start_msg()))]
196
+
197
+ inp.submit(respond, [chatbot, inp], [chatbot, inp])
198
+ clear.click(lambda: ([], ""), [], [chatbot, inp])
199
+
200
+ with gr.Tab("ذكاء عام (HF)"):
201
  gr.Markdown("## محادثة ذكاء اصطناعي عام (Hugging Face)")
202
 
203
  hf_token = gr.Textbox(label="ضع HuggingFace Token", type="password")