OuroborosM commited on
Commit
c00437f
·
1 Parent(s): 1342064

update load

Browse files
Files changed (1) hide show
  1. app.py +18 -3
app.py CHANGED
@@ -1502,8 +1502,22 @@ def Text2Sound_HMI():
1502
  # return None
1503
 
1504
  def UpdateChatbot(Running_history):
1505
- timestr = time.strftime("%Y%m%d-%H%M%S")
1506
- Running_history = Running_history + [(None, timestr)]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1507
  yield Running_history
1508
 
1509
  global last_answer
@@ -1662,7 +1676,8 @@ with gr.Blocks() as demo:
1662
  # voice_output.play(clear_voice, None, None)
1663
 
1664
  # demo.load(read_logs, None, logs, every=1)
1665
- demo.load(UpdateChatbot, chatbot, chatbot, every=5)
 
1666
 
1667
 
1668
 
 
1502
  # return None
1503
 
1504
  def UpdateChatbot(Running_history):
1505
+ timestr = time.strftime("%Y-%m-%d-%H:%M:%S")
1506
+ Running_history = Running_history + [(None, 'Timestamp: '+timestr)]
1507
+ yield Running_history
1508
+ WelcomeStr = """
1509
+ This is AI Assistant powered by MECH Core Team.
1510
+ It is connected remotely with GPT4. The following function is available for you.
1511
+ 1. Free Chat
1512
+ 2. Search information Engineering Data: Vector Database + Internet
1513
+ 3. Make specific task with tools:
1514
+ - Text to Sound
1515
+ - Sound to Text
1516
+ - Doc summary
1517
+ - Code interpret (Under Construction)
1518
+ - Text to Image (forecast)
1519
+ """
1520
+ Running_history = Running_history + [(None, WelcomeStr)]
1521
  yield Running_history
1522
 
1523
  global last_answer
 
1676
  # voice_output.play(clear_voice, None, None)
1677
 
1678
  # demo.load(read_logs, None, logs, every=1)
1679
+ demo.load(UpdateChatbot, chatbot, chatbot)
1680
+ # load(UpdateChatbot, chatbot, chatbot, every=5)
1681
 
1682
 
1683