Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,8 @@ df = pd.read_csv(csv_name)
|
|
16 |
|
17 |
|
18 |
def csv_prompter(question,csv_name):
|
19 |
-
|
|
|
20 |
|
21 |
fulltext = "A question is provided below. Given the question, extract " + \
|
22 |
"keywords from the text. Focus on extracting the keywords that we can use " + \
|
@@ -120,7 +121,8 @@ with gr.Blocks() as demo:
|
|
120 |
gr.Markdown("## Example: If I have frontal headache, fever, and painful sinuses, what disease should I have, and what medical test should I take?")
|
121 |
openai_api_key_textbox = gr.Textbox(placeholder="Paste your OpenAI API key (sk-...) and hit Enter",
|
122 |
show_label=False, lines=1, type='password')
|
123 |
-
|
|
|
124 |
chatbot = gr.Chatbot()
|
125 |
msg = gr.Textbox()
|
126 |
clear = gr.Button("Clear")
|
@@ -140,8 +142,7 @@ with gr.Blocks() as demo:
|
|
140 |
invitation = "ChatDoctor: "
|
141 |
human_invitation = "Patient: "
|
142 |
print(history)
|
143 |
-
|
144 |
-
openai.api_key = openai_api_key_textbox
|
145 |
|
146 |
question = ""
|
147 |
for each_ques in history:
|
|
|
16 |
|
17 |
|
18 |
def csv_prompter(question,csv_name):
|
19 |
+
|
20 |
+
openai.api_key = openai_api_key_textbox
|
21 |
|
22 |
fulltext = "A question is provided below. Given the question, extract " + \
|
23 |
"keywords from the text. Focus on extracting the keywords that we can use " + \
|
|
|
121 |
gr.Markdown("## Example: If I have frontal headache, fever, and painful sinuses, what disease should I have, and what medical test should I take?")
|
122 |
openai_api_key_textbox = gr.Textbox(placeholder="Paste your OpenAI API key (sk-...) and hit Enter",
|
123 |
show_label=False, lines=1, type='password')
|
124 |
+
print(openai_api_key_textbox)
|
125 |
+
|
126 |
chatbot = gr.Chatbot()
|
127 |
msg = gr.Textbox()
|
128 |
clear = gr.Button("Clear")
|
|
|
142 |
invitation = "ChatDoctor: "
|
143 |
human_invitation = "Patient: "
|
144 |
print(history)
|
145 |
+
|
|
|
146 |
|
147 |
question = ""
|
148 |
for each_ques in history:
|