shibanovp commited on
Commit
b1191e1
1 Parent(s): 38fc27b

test: gradio spaces

Browse files
Files changed (2) hide show
  1. app.py +30 -0
  2. requirements.txt +9 -0
app.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ summary = gr.Interface(
4
+ lambda email: "summay",
5
+ [
6
+ gr.Text(label="email"),
7
+ ],
8
+ gr.TextArea(),
9
+ allow_flagging='never',
10
+ )
11
+
12
+ def ask(a, chat_history=[]):
13
+ chat_history.append((question, '42'))
14
+ return
15
+
16
+
17
+ qa = gr.Interface(
18
+ ask,
19
+ [
20
+ gr.Text(label="question"),
21
+ 'state'
22
+ ],
23
+ [gr.Chatbot(), gr.Text(label="question"), 'state'],
24
+ title="Alphabet's Q1 2023 10-Q MD&A",
25
+ allow_flagging='never',
26
+ )
27
+
28
+ gr.TabbedInterface(
29
+ [qa, summary], ["QA", "Summary"]
30
+ ).launch()
requirements.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ httpx
2
+ pandas
3
+ beautifulsoup4
4
+ langchain
5
+ openai
6
+ tiktoken
7
+ chromadb
8
+ unstructured
9
+ python-dotenv