Commit
·
56620ea
1
Parent(s):
7486e2b
import libraries in app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
def comment_datetime(comment_json):
|
2 |
dt = datetime.fromisoformat(comment_json["created_at"])
|
3 |
return comment_json["user"]["login"] + " commented on " + dt.strftime("%b %d, %Y") + ":"
|
|
|
1 |
+
import os
|
2 |
+
import requests
|
3 |
+
from datetime import datetime
|
4 |
+
|
5 |
+
from bs4 import BeautifulSoup
|
6 |
+
|
7 |
+
import gradio as gr
|
8 |
+
from gradio import components
|
9 |
+
|
10 |
+
from langchain.chat_models import ChatOpenAI
|
11 |
+
from langchain.chains.summarize import load_summarize_chain
|
12 |
+
from langchain.docstore.document import Document
|
13 |
+
|
14 |
+
from openai.error import AuthenticationError
|
15 |
+
|
16 |
def comment_datetime(comment_json):
|
17 |
dt = datetime.fromisoformat(comment_json["created_at"])
|
18 |
return comment_json["user"]["login"] + " commented on " + dt.strftime("%b %d, %Y") + ":"
|