Pontonkid commited on
Commit
d5c3b26
·
1 Parent(s): b62ed41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -0
app.py CHANGED
@@ -1,3 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  co = cohere.Client("E4YAyUyM0rKVUDlKULKmDK7JayiV8SmfDt4RnGKv")
3
 
 
1
+
2
+ import cohere
3
+
4
+ # initialize Cohere client
5
+ co = cohere.Client("E4YAyUyM0rKVUDlKULKmDK7JayiV8SmfDt4RnGKv")
6
+
7
+
8
+ conversation="""
9
+ Senior Dev: Hey, have you seen the latest pull request for the authentication module?
10
+ Junior Dev: No, not yet. What's in it?
11
+ Senior Dev: They've added support for JWT tokens, so we can use that instead of session cookies for authentication.
12
+ Junior Dev: Oh, that's great. I've been wanting to switch to JWT for a while now.
13
+ Senior Dev: Yeah, it's definitely more secure and scalable. I've reviewed the code and it looks good, so go ahead and merge it if you're comfortable with it.
14
+ Junior Dev: Will do, thanks for the heads up.
15
+ """
16
+
17
+
18
+ response = co.summarize( conversation,
19
+ model='summarize-xlarge',
20
+ length='short',
21
+ extractiveness='high',
22
+ temperature = 0.5,
23
+ )
24
+ summary = response.summary
25
+
26
+ print(summary)
27
+
28
  import gradio as gr
29
  co = cohere.Client("E4YAyUyM0rKVUDlKULKmDK7JayiV8SmfDt4RnGKv")
30