Spaces:
Runtime error
Runtime error
Commit
·
00a39ef
1
Parent(s):
53fdf6b
clear code and version
Browse files
app.py
CHANGED
|
@@ -99,21 +99,21 @@ CurrentAgent = os.environ["agent_type"]
|
|
| 99 |
|
| 100 |
global ChatbotHistory
|
| 101 |
ChatbotHistory = []
|
| 102 |
-
timestr = time.strftime("%Y-%m-%d-%H:%M:%S")
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
WelcomeStr = """
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
ChatbotHistory = ChatbotHistory + [(None, timestr+'\n'+WelcomeStr)]
|
| 117 |
|
| 118 |
class CodeBlock:
|
| 119 |
'''
|
|
@@ -1743,9 +1743,7 @@ def UpdateChatbot(Running_history):
|
|
| 1743 |
1. Free Chat with AI assistant
|
| 1744 |
2. Search Information and Engineering Data: Vector Database + Internet
|
| 1745 |
3. Make specific task with tools:
|
| 1746 |
-
- Text to Sound
|
| 1747 |
-
- Sound to Text
|
| 1748 |
-
- Doc summary
|
| 1749 |
- Code interpret (Beta version)
|
| 1750 |
- Text to Image (forecast)
|
| 1751 |
"""
|
|
@@ -1841,27 +1839,27 @@ with gr.Blocks() as demo:
|
|
| 1841 |
# main.textbox.submit(chathmi3, [main.textbox, main.chatbot], [main.textbox, main.chatbot])
|
| 1842 |
UserRecord = gr.State([])
|
| 1843 |
# UserRecord.append()
|
| 1844 |
-
timestr = time.strftime("%Y-%m-%d-%H:%M:%S")
|
| 1845 |
-
# Running_history = Running_history + [(None, 'Timestamp: '+timestr)]
|
| 1846 |
-
# # yield Running_history
|
| 1847 |
-
WelcomeStr = """
|
| 1848 |
-
This is AI Assistant powered by MECH Core Team.
|
| 1849 |
-
It is connected remotely with GPT4. The following function is available for you.
|
| 1850 |
-
1. Free Chat with AI assistant
|
| 1851 |
-
2. Search Information and Engineering Data: Vector Database + Internet
|
| 1852 |
-
3. Make specific task with tools:
|
| 1853 |
-
|
| 1854 |
-
|
| 1855 |
-
|
| 1856 |
-
|
| 1857 |
-
|
| 1858 |
-
"""
|
| 1859 |
# # Running_history = Running_history + [(None, timestr+'\n'+WelcomeStr)]
|
| 1860 |
# UserRecord = UserRecord + [(None, timestr+'\n'+WelcomeStr)]
|
| 1861 |
# UserRecord.append((None, timestr+'\n'+WelcomeStr))
|
| 1862 |
with gr.Column() as main2:
|
| 1863 |
title = gr.Markdown("""# <center> STLA BABY - YOUR FRIENDLY GUIDE
|
| 1864 |
-
<center> v0.7.
|
| 1865 |
chatbot = gr.Chatbot(
|
| 1866 |
avatar_images=((os.path.join(os.path.dirname(__file__),"User.png")), (os.path.join(os.path.dirname(__file__),"AI.png"))),
|
| 1867 |
)
|
|
|
|
| 99 |
|
| 100 |
global ChatbotHistory
|
| 101 |
ChatbotHistory = []
|
| 102 |
+
# timestr = time.strftime("%Y-%m-%d-%H:%M:%S")
|
| 103 |
+
# # Running_history = Running_history + [(None, 'Timestamp: '+timestr)]
|
| 104 |
+
# # yield Running_history
|
| 105 |
+
# WelcomeStr = """
|
| 106 |
+
# This is AI Assistant powered by MECH Core Team.
|
| 107 |
+
# It is connected remotely with GPT4. The following function is available for you.
|
| 108 |
+
# 1. Free Chat with AI assistant
|
| 109 |
+
# 2. Search Information and Engineering Data: Vector Database + Internet
|
| 110 |
+
# 3. Make specific task with tools:
|
| 111 |
+
# - Text to Sound | Sound to Text | Doc summary
|
| 112 |
+
# - Code interpret (Beta version)
|
| 113 |
+
# - Text to Image (forecast)
|
| 114 |
+
# """
|
| 115 |
+
# # Running_history = Running_history + [(None, timestr+'\n'+WelcomeStr)]
|
| 116 |
+
# ChatbotHistory = ChatbotHistory + [(None, timestr+'\n'+WelcomeStr)]
|
| 117 |
|
| 118 |
class CodeBlock:
|
| 119 |
'''
|
|
|
|
| 1743 |
1. Free Chat with AI assistant
|
| 1744 |
2. Search Information and Engineering Data: Vector Database + Internet
|
| 1745 |
3. Make specific task with tools:
|
| 1746 |
+
- Text to Sound | Sound to Text | Doc summary
|
|
|
|
|
|
|
| 1747 |
- Code interpret (Beta version)
|
| 1748 |
- Text to Image (forecast)
|
| 1749 |
"""
|
|
|
|
| 1839 |
# main.textbox.submit(chathmi3, [main.textbox, main.chatbot], [main.textbox, main.chatbot])
|
| 1840 |
UserRecord = gr.State([])
|
| 1841 |
# UserRecord.append()
|
| 1842 |
+
# timestr = time.strftime("%Y-%m-%d-%H:%M:%S")
|
| 1843 |
+
# # Running_history = Running_history + [(None, 'Timestamp: '+timestr)]
|
| 1844 |
+
# # # yield Running_history
|
| 1845 |
+
# WelcomeStr = """
|
| 1846 |
+
# This is AI Assistant powered by MECH Core Team.
|
| 1847 |
+
# It is connected remotely with GPT4. The following function is available for you.
|
| 1848 |
+
# 1. Free Chat with AI assistant
|
| 1849 |
+
# 2. Search Information and Engineering Data: Vector Database + Internet
|
| 1850 |
+
# 3. Make specific task with tools:
|
| 1851 |
+
# - Text to Sound
|
| 1852 |
+
# - Sound to Text
|
| 1853 |
+
# - Doc summary
|
| 1854 |
+
# - Code interpret (Beta version)
|
| 1855 |
+
# - Text to Image (forecast)
|
| 1856 |
+
# """
|
| 1857 |
# # Running_history = Running_history + [(None, timestr+'\n'+WelcomeStr)]
|
| 1858 |
# UserRecord = UserRecord + [(None, timestr+'\n'+WelcomeStr)]
|
| 1859 |
# UserRecord.append((None, timestr+'\n'+WelcomeStr))
|
| 1860 |
with gr.Column() as main2:
|
| 1861 |
title = gr.Markdown("""# <center> STLA BABY - YOUR FRIENDLY GUIDE
|
| 1862 |
+
<center> v0.7.5: Powered by MECH Core Team - GPT4 REMOTE MODE"""),
|
| 1863 |
chatbot = gr.Chatbot(
|
| 1864 |
avatar_images=((os.path.join(os.path.dirname(__file__),"User.png")), (os.path.join(os.path.dirname(__file__),"AI.png"))),
|
| 1865 |
)
|