Spaces:
Runtime error
Runtime error
Update to remove encoding and return response directly
Browse files
app.py
CHANGED
|
@@ -11,7 +11,6 @@ def analyze(project_data, question):
|
|
| 11 |
)
|
| 12 |
|
| 13 |
prompt = f"Analyze this project: {project_data}\n\nQuestion: {question}"
|
| 14 |
-
inputs = client.encoding("text", prompt)
|
| 15 |
|
| 16 |
response = client.text_generation(
|
| 17 |
prompt,
|
|
@@ -22,7 +21,8 @@ def analyze(project_data, question):
|
|
| 22 |
do_sample=True
|
| 23 |
)
|
| 24 |
|
| 25 |
-
return
|
|
|
|
| 26 |
except Exception as e:
|
| 27 |
print(f"Error details: {str(e)}")
|
| 28 |
return f"Error occurred: {str(e)}"
|
|
|
|
| 11 |
)
|
| 12 |
|
| 13 |
prompt = f"Analyze this project: {project_data}\n\nQuestion: {question}"
|
|
|
|
| 14 |
|
| 15 |
response = client.text_generation(
|
| 16 |
prompt,
|
|
|
|
| 21 |
do_sample=True
|
| 22 |
)
|
| 23 |
|
| 24 |
+
return response
|
| 25 |
+
|
| 26 |
except Exception as e:
|
| 27 |
print(f"Error details: {str(e)}")
|
| 28 |
return f"Error occurred: {str(e)}"
|