briankchan commited on
Commit
ed9313b
·
1 Parent(s): dd1d609

Clean imports

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -1,19 +1,17 @@
1
  # based on https://github.com/hwchase17/langchain-gradio-template/blob/master/app.py
2
- from difflib import SequenceMatcher
3
  import os
4
- import re
 
5
  import gradio as gr
 
6
  from langchain.chains import LLMChain
7
- from langchain.chat_models import PromptLayerChatOpenAI, AzureChatOpenAI
8
  from langchain.memory import ConversationBufferMemory
9
  from langchain.prompts import PromptTemplate
10
  from langchain.prompts.chat import ChatPromptTemplate, HumanMessagePromptTemplate
11
  from langchain.schema import HumanMessage
12
 
13
- from diff_match_patch import diff_match_patch
14
- import collections
15
- from itertools import islice
16
-
17
  GRAMMAR_PROMPT = "Proofread for grammar and spelling without adding new paragraphs:\n{content}"
18
 
19
  INTRO_PROMPT = """These are the parts of a good introductory paragraph:
 
1
  # based on https://github.com/hwchase17/langchain-gradio-template/blob/master/app.py
2
+ import collections
3
  import os
4
+ from itertools import islice
5
+
6
  import gradio as gr
7
+ from diff_match_patch import diff_match_patch
8
  from langchain.chains import LLMChain
9
+ from langchain.chat_models import PromptLayerChatOpenAI
10
  from langchain.memory import ConversationBufferMemory
11
  from langchain.prompts import PromptTemplate
12
  from langchain.prompts.chat import ChatPromptTemplate, HumanMessagePromptTemplate
13
  from langchain.schema import HumanMessage
14
 
 
 
 
 
15
  GRAMMAR_PROMPT = "Proofread for grammar and spelling without adding new paragraphs:\n{content}"
16
 
17
  INTRO_PROMPT = """These are the parts of a good introductory paragraph: