yangswei commited on
Commit
7a3aecb
1 Parent(s): 6e043ff

Add application file

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. requirements.txt +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ def song_meaning(song, artist):
26
  prompt_template_song_meaning = PromptTemplate(input_variables=["artist", "song", "content"],
27
  template=template_song_meaning)
28
 
29
- llm = ChatOpenAI(openai_api_key="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", model_name="gpt-3.5-turbo", temperature=0)
30
  chain = LLMChain(llm=llm, prompt=prompt_template_song_meaning)
31
  results = chain.run(artist=artist_input, song=song_input, content=docs[0].page_content)
32
 
 
26
  prompt_template_song_meaning = PromptTemplate(input_variables=["artist", "song", "content"],
27
  template=template_song_meaning)
28
 
29
+ llm = ChatOpenAI(openai_api_key=os.environ['OPENAI_API_KEY'], model_name="gpt-3.5-turbo", temperature=0)
30
  chain = LLMChain(llm=llm, prompt=prompt_template_song_meaning)
31
  results = chain.run(artist=artist_input, song=song_input, content=docs[0].page_content)
32
 
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- gradio
2
- langchain
 
1
+ gradio==4.21.0
2
+ langchain==0.1.12