AI-DHD commited on
Commit
01dca8a
1 Parent(s): 92bc134

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -13
app.py CHANGED
@@ -2,18 +2,30 @@ import os
2
  import openai
3
  import gradio as gr
4
 
5
- openai.api_key = "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"
 
6
 
7
- response = openai.Completion.create(
8
- model="davinci:ft-placeholder-2022-12-10-04-13-26",
9
- prompt=input,
10
- temperature=0.13,
11
- max_tokens=310,
12
- top_p=1,
13
- frequency_penalty=0.36,
14
- presence_penalty=1.25
15
- )
16
 
17
- gr.Interface(fn=predict,
18
- inputs=["text", "state"],
19
- outputs=["text"]).launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  import openai
3
  import gradio as gr
4
 
5
+ title = "Current fine-tuned GPT3, AI-DHD"
6
+ description = "Your virtual ADHD coach designed by a Clinical Psychologist who has ADHD, named Alexander McLennan."
7
 
8
+ def question_answer(context, question):
9
+ pass
10
+ openai.api_key = "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"
 
 
 
 
 
 
11
 
12
+ start_sequence = "\\\n\nAI-DHD: "
13
+ restart_sequence = "\\\n\nGeorge: "
14
+
15
+ response = openai.Completion.create(
16
+ model="davinci:ft-placeholder-2022-12-10-04-13-26",
17
+ prompt=input,
18
+ temperature=0.13,
19
+ max_tokens=310,
20
+ top_p=1,
21
+ frequency_penalty=0.36,
22
+ presence_penalty=1.25
23
+ )
24
+
25
+
26
+ gr.Interface(
27
+ inference,
28
+ [gr.inputs.Textbox(label="Context",lines=40)],
29
+ [gr.outputs.Textbox(label="Response")],
30
+ title=title,
31
+ description=description).launch(enable_queue=True,cache_examples=True)