Tricia Nieva commited on
Commit
12f441b
·
1 Parent(s): b603d80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -11,7 +11,7 @@ import gradio as gr
11
  openai.organization = "org-orRhfBkKOfOuNACbjPyWKbUt"
12
  openai.api_key = "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"
13
 
14
- def chat(input):
15
 
16
  response = openai.Completion.create(
17
  model="davinci:ft-placeholder:ai-dhd-2022-12-07-10-09-37",
@@ -26,10 +26,5 @@ def chat(input):
26
 
27
  return xyz
28
 
29
- gr.Interface(
30
- chat_hf,
31
- [gr.Textbox(label = ' Input custom text for AI-DHD! '),
32
- outputs = gr.Outputs.Textbox(type="text", label="Response")
33
- , title = "" +' AI-DHD 🤖💬💻 on 🤗 huggingface. '+ "",
34
- description="""Fine-tune 1.1
35
- """).launch(debug = True)
 
11
  openai.organization = "org-orRhfBkKOfOuNACbjPyWKbUt"
12
  openai.api_key = "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"
13
 
14
+ def chat(text):
15
 
16
  response = openai.Completion.create(
17
  model="davinci:ft-placeholder:ai-dhd-2022-12-07-10-09-37",
 
26
 
27
  return xyz
28
 
29
+ demo = gr.Interface(chat, "text", "text")
30
+ demo.launch(share=True, auth=("username", "password")).launch(debug = True)