cannin commited on
Commit
f7da31b
·
1 Parent(s): 8c9d5b0

Change requirements

Browse files
Files changed (2) hide show
  1. app.py +4 -3
  2. requirements.txt +2 -2
app.py CHANGED
@@ -20,15 +20,16 @@ def chat_with_openai(api_key, prompt):
20
  return f"Error: {str(e)}"
21
 
22
 
23
- iface = gr.Interface(
24
  fn=chat_with_openai,
25
  inputs=[
26
  gr.Textbox(label="OpenAI API Key", placeholder="sk-...", type="password"),
27
  gr.Textbox(label="Prompt", placeholder="Tell me a joke"),
28
  ],
29
  outputs="text",
30
- title="OpenAI Example; V0.0.5",
31
  description="Enter your OpenAI API key and a prompt like 'Tell me a joke'."
32
  )
33
 
34
- iface.launch()
 
 
20
  return f"Error: {str(e)}"
21
 
22
 
23
+ gradio_app = gr.Interface(
24
  fn=chat_with_openai,
25
  inputs=[
26
  gr.Textbox(label="OpenAI API Key", placeholder="sk-...", type="password"),
27
  gr.Textbox(label="Prompt", placeholder="Tell me a joke"),
28
  ],
29
  outputs="text",
30
+ title="OpenAI Example; V0.0.6",
31
  description="Enter your OpenAI API key and a prompt like 'Tell me a joke'."
32
  )
33
 
34
+ if __name__ == "__main__":
35
+ gradio_app.launch()
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- openai>=1.63.1
2
- gradio>=5.23.2
 
1
+ openai
2
+ gradio