Spaces:
Sleeping
Sleeping
Add application file
Browse files- app.py +1 -1
- 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=
|
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
|