Spaces:
Sleeping
Sleeping
Update finito.py
Browse files
finito.py
CHANGED
@@ -1,16 +1,3 @@
|
|
1 |
-
# -*- coding: utf-8 -*-
|
2 |
-
"""finito.ipynb
|
3 |
-
|
4 |
-
Automatically generated by Colaboratory.
|
5 |
-
|
6 |
-
Original file is located at
|
7 |
-
https://colab.research.google.com/drive/1rNnk3xajWzVdyH2eXJ58ghLpk-zejGw-
|
8 |
-
"""
|
9 |
-
|
10 |
-
!pip install -r requirements.txt
|
11 |
-
|
12 |
-
!pip install gradio
|
13 |
-
|
14 |
from langchain.prompts import StringPromptTemplate
|
15 |
import re
|
16 |
import langchain
|
@@ -78,6 +65,8 @@ agent = initialize_agent(
|
|
78 |
verbose = True
|
79 |
)
|
80 |
|
81 |
-
|
|
|
|
|
82 |
|
83 |
-
gr.ChatInterface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from langchain.prompts import StringPromptTemplate
|
2 |
import re
|
3 |
import langchain
|
|
|
65 |
verbose = True
|
66 |
)
|
67 |
|
68 |
+
def data_gov_ma(message, history):
|
69 |
+
response = agent.run(message)
|
70 |
+
return response
|
71 |
|
72 |
+
gr.ChatInterface(data_gov_ma).launch()
|