Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,7 +47,7 @@ def analyze_question(question):
|
|
| 47 |
temperature=0.0
|
| 48 |
)
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
except openai.OpenAIError as e:
|
| 53 |
status_button.update(value=f"An error occurred: {str(e)}")
|
|
@@ -113,6 +113,7 @@ with gr.Blocks() as demo:
|
|
| 113 |
analyze_button.click(
|
| 114 |
analyze_question,
|
| 115 |
inputs=question_input
|
|
|
|
| 116 |
)
|
| 117 |
|
| 118 |
-
demo.launch()
|
|
|
|
| 47 |
temperature=0.0
|
| 48 |
)
|
| 49 |
|
| 50 |
+
return(value=response.choices[0].message.content)
|
| 51 |
|
| 52 |
except openai.OpenAIError as e:
|
| 53 |
status_button.update(value=f"An error occurred: {str(e)}")
|
|
|
|
| 113 |
analyze_button.click(
|
| 114 |
analyze_question,
|
| 115 |
inputs=question_input
|
| 116 |
+
outputs=question_analysis_output
|
| 117 |
)
|
| 118 |
|
| 119 |
+
demo.launch(share=True, show_error=True)
|