coolcompany / app.py
kweyamba's picture
Update app.py
5a1d1dc
raw
history blame contribute delete
656 Bytes
import os
import gradio as gr
from langchain.llms import OpenAI
OPENAI_API_KEY = os.environ["OPENAI_API_KEY"]
llm = OpenAI(temperature=0.9)
def company_name(question):
answer = llm(f"What would be a good company name for a company that {question}")
return answer
with gr.Blocks() as demo:
gr.Markdown("Start typing below and then click **Run** to see the output.")
with gr.Row():
inp = gr.Textbox(placeholder="What is does your company do?", label="Enter what your company does")
out = gr.Textbox(label="Your company name should be")
btn = gr.Button("Run")
btn.click(fn=company_name, inputs=inp, outputs=out)
demo.launch()