bstraehle commited on
Commit
2d67e97
·
verified ·
1 Parent(s): e5984fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -50,16 +50,14 @@ def invoke(openai_api_key,
50
 
51
  gr.close_all()
52
 
53
- PROMPT = "Recommend a place that's close to Golden Gate, show picture"
54
-
55
  demo = gr.Interface(
56
  fn = invoke,
57
  inputs = [gr.Textbox(label = "OpenAI API Key", type = "password", lines = 1),
58
- gr.Textbox(label = "Prompt", value = PROMPT, lines = 1),
59
  gr.Number(label = "Accomodates", value = 2),
60
  gr.Number(label = "Bedrooms", value = 1),
61
- gr.Radio([RAG_OFF, RAG_NAIVE, RAG_ADVANCED], label = "Retrieval-Augmented Generation", value = RAG_ADVANCED)],
62
- outputs = [gr.Markdown(label = "Completion", value = os.environ["OUTPUT"], line_breaks = True, sanitize_html = False)],
63
  title = "Context-Aware Reasoning Application",
64
  description = os.environ["DESCRIPTION"]
65
  )
 
50
 
51
  gr.close_all()
52
 
 
 
53
  demo = gr.Interface(
54
  fn = invoke,
55
  inputs = [gr.Textbox(label = "OpenAI API Key", type = "password", lines = 1),
56
+ gr.Textbox(label = "Prompt", value = os.environ["PROMPT"], lines = 1),
57
  gr.Number(label = "Accomodates", value = 2),
58
  gr.Number(label = "Bedrooms", value = 1),
59
+ gr.Radio([RAG_OFF, RAG_NAIVE, RAG_ADVANCED], label = "Retrieval-Augmented Generation", value = RAG_NAIVE)],
60
+ outputs = [gr.Markdown(label = "Completion", value = os.environ["COMPLETION"], line_breaks = True, sanitize_html = False)],
61
  title = "Context-Aware Reasoning Application",
62
  description = os.environ["DESCRIPTION"]
63
  )