Spaces:
Runtime error
Runtime error
Louis Kweyamba
commited on
Commit
·
53fdf15
1
Parent(s):
72a2086
resolve expose
Browse files
app.py
CHANGED
|
@@ -3,8 +3,8 @@ import openai
|
|
| 3 |
import os
|
| 4 |
import gradio as gr
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
|
| 9 |
|
| 10 |
def ask_question(csv_file, user_question):
|
|
@@ -28,5 +28,5 @@ def ask_question(csv_file, user_question):
|
|
| 28 |
# Use Gradio to build the frontend
|
| 29 |
inputs = [gr.inputs.File(label="upload your csv file here",type="file"), gr.inputs.Textbox(placeholder="Ask a question about the data")]
|
| 30 |
outputs = gr.outputs.Textbox()
|
| 31 |
-
interface = gr.Interface(ask_question, inputs, outputs, title="Pharmalaki Ai
|
| 32 |
interface.launch()
|
|
|
|
| 3 |
import os
|
| 4 |
import gradio as gr
|
| 5 |
|
| 6 |
+
openai.api_key = os.environ["OPENAI_API_KEY"]
|
| 7 |
+
|
| 8 |
|
| 9 |
|
| 10 |
def ask_question(csv_file, user_question):
|
|
|
|
| 28 |
# Use Gradio to build the frontend
|
| 29 |
inputs = [gr.inputs.File(label="upload your csv file here",type="file"), gr.inputs.Textbox(placeholder="Ask a question about the data")]
|
| 30 |
outputs = gr.outputs.Textbox()
|
| 31 |
+
interface = gr.Interface(ask_question, inputs, outputs, title="Pharmalaki Ai Version 1.0")
|
| 32 |
interface.launch()
|