Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,11 +38,13 @@ def getQuestionAndPrompt():
|
|
| 38 |
return choice1,choice2
|
| 39 |
|
| 40 |
def test():
|
| 41 |
-
|
| 42 |
-
|
|
|
|
| 43 |
|
| 44 |
question_textbox = gr.Textbox(label="", lines=10)
|
| 45 |
prompt_textbox = gr.Textbox(label="", lines=10)
|
|
|
|
| 46 |
gr.Interface(fn=test,
|
| 47 |
inputs=[],
|
| 48 |
-
outputs=[question_textbox,
|
|
|
|
| 38 |
return choice1,choice2
|
| 39 |
|
| 40 |
def test():
|
| 41 |
+
table_df = pd.read_csv("prompts.csv", header=0)
|
| 42 |
+
table_json=table_df.to_json(orient="records")
|
| 43 |
+
return "",table_json
|
| 44 |
|
| 45 |
question_textbox = gr.Textbox(label="", lines=10)
|
| 46 |
prompt_textbox = gr.Textbox(label="", lines=10)
|
| 47 |
+
json_output=gr.JSON(label="Output", visible=True)
|
| 48 |
gr.Interface(fn=test,
|
| 49 |
inputs=[],
|
| 50 |
+
outputs=[question_textbox, json_output]).launch()
|