OmkarG commited on
Commit
3f7221a
·
1 Parent(s): e3e6241

added faiss

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -49,15 +49,14 @@ def generate_chat_completion_interface(USER_INPUT):
49
  related_vectors = "\n".join(top_documents)
50
 
51
  result = generate_chat_completion(client, SYSTEM_PROMPT, USER_INPUT, related_vectors)
52
- formatted_result = json.dumps(result, indent=4)
53
 
54
- return formatted_result
55
 
56
  # Set up the Gradio app interface
57
  iface = gr.Interface(
58
  fn=generate_chat_completion_interface, # Function to run on input
59
  inputs=gr.Textbox(label="Enter your sentence"), # Input field
60
- outputs=gr.Textbox(label="Generated Completion", lines=10), # Output field
61
  title="Chat Completion Generator", # Title of the app
62
  description="This app generates chat completions based on a user-provided input sentence."
63
  )
 
49
  related_vectors = "\n".join(top_documents)
50
 
51
  result = generate_chat_completion(client, SYSTEM_PROMPT, USER_INPUT, related_vectors)
 
52
 
53
+ return result
54
 
55
  # Set up the Gradio app interface
56
  iface = gr.Interface(
57
  fn=generate_chat_completion_interface, # Function to run on input
58
  inputs=gr.Textbox(label="Enter your sentence"), # Input field
59
+ outputs=gr.Textbox(label="Generated Completion"), # Output field
60
  title="Chat Completion Generator", # Title of the app
61
  description="This app generates chat completions based on a user-provided input sentence."
62
  )