Spaces:
Paused
Paused
themissingCRAM
commited on
Commit
·
9c8b045
1
Parent(s):
071e96e
chroma db
Browse files- .idea/.gitignore +3 -0
- .idea/agentic_rag.iml +12 -0
- .idea/inspectionProfiles/profiles_settings.xml +6 -0
- .idea/misc.xml +7 -0
- .idea/modules.xml +8 -0
- .idea/vcs.xml +6 -0
- app.py +9 -1
.idea/.gitignore
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Default ignored files
|
| 2 |
+
/shelf/
|
| 3 |
+
/workspace.xml
|
.idea/agentic_rag.iml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<module type="PYTHON_MODULE" version="4">
|
| 3 |
+
<component name="NewModuleRootManager">
|
| 4 |
+
<content url="file://$MODULE_DIR$" />
|
| 5 |
+
<orderEntry type="jdk" jdkName="agents" jdkType="Python SDK" />
|
| 6 |
+
<orderEntry type="sourceFolder" forTests="false" />
|
| 7 |
+
</component>
|
| 8 |
+
<component name="PyDocumentationSettings">
|
| 9 |
+
<option name="format" value="PLAIN" />
|
| 10 |
+
<option name="myDocStringFormat" value="Plain" />
|
| 11 |
+
</component>
|
| 12 |
+
</module>
|
.idea/inspectionProfiles/profiles_settings.xml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<component name="InspectionProjectProfileManager">
|
| 2 |
+
<settings>
|
| 3 |
+
<option name="USE_PROJECT_PROFILE" value="false" />
|
| 4 |
+
<version value="1.0" />
|
| 5 |
+
</settings>
|
| 6 |
+
</component>
|
.idea/misc.xml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="Black">
|
| 4 |
+
<option name="sdkName" value="agents" />
|
| 5 |
+
</component>
|
| 6 |
+
<component name="ProjectRootManager" version="2" project-jdk-name="agents" project-jdk-type="Python SDK" />
|
| 7 |
+
</project>
|
.idea/modules.xml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="ProjectModuleManager">
|
| 4 |
+
<modules>
|
| 5 |
+
<module fileurl="file://$PROJECT_DIR$/.idea/agentic_rag.iml" filepath="$PROJECT_DIR$/.idea/agentic_rag.iml" />
|
| 6 |
+
</modules>
|
| 7 |
+
</component>
|
| 8 |
+
</project>
|
.idea/vcs.xml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="VcsDirectoryMappings">
|
| 4 |
+
<mapping directory="" vcs="Git" />
|
| 5 |
+
</component>
|
| 6 |
+
</project>
|
app.py
CHANGED
|
@@ -132,11 +132,19 @@ if __name__ == "__main__":
|
|
| 132 |
for msg in stream_to_gradio(agent, new_message):
|
| 133 |
conversation_history.append(msg)
|
| 134 |
yield "", conversation_history
|
| 135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
with gr.Blocks() as b:
|
| 137 |
chatbot = gr.Chatbot(type="messages", height=1000)
|
| 138 |
textbox = gr.Textbox(lines=3, label="")
|
| 139 |
button = gr.Button("reply")
|
|
|
|
| 140 |
button.click(enter_message, [textbox, chatbot], [textbox, chatbot])
|
|
|
|
|
|
|
|
|
|
| 141 |
b.launch()
|
| 142 |
# GradioUI(agent).launch()
|
|
|
|
| 132 |
for msg in stream_to_gradio(agent, new_message):
|
| 133 |
conversation_history.append(msg)
|
| 134 |
yield "", conversation_history
|
| 135 |
+
def stop_generating():
|
| 136 |
+
agent.interrupt()
|
| 137 |
+
def clear_messages(conversation_history):
|
| 138 |
+
stop_generating()
|
| 139 |
+
yield conversation_history.clear()
|
| 140 |
with gr.Blocks() as b:
|
| 141 |
chatbot = gr.Chatbot(type="messages", height=1000)
|
| 142 |
textbox = gr.Textbox(lines=3, label="")
|
| 143 |
button = gr.Button("reply")
|
| 144 |
+
clear_messages_button = gr.Button("clear messages")
|
| 145 |
button.click(enter_message, [textbox, chatbot], [textbox, chatbot])
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
clear_messages_button.click(clear_messages,chatbot,chatbot)
|
| 149 |
b.launch()
|
| 150 |
# GradioUI(agent).launch()
|