Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,11 @@ def get_random_fact() -> str:
|
|
| 33 |
|
| 34 |
data = response.json()
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
except requests.exceptions.RequestException as e:
|
| 39 |
return f"Error fetching random fact: {str(e)}"
|
|
|
|
| 33 |
|
| 34 |
data = response.json()
|
| 35 |
|
| 36 |
+
fact = f"Random Fact: {data['text']}"
|
| 37 |
+
final_answer(fact)
|
| 38 |
+
return fact
|
| 39 |
+
|
| 40 |
+
# return f"Random Fact: {data['text']}"
|
| 41 |
|
| 42 |
except requests.exceptions.RequestException as e:
|
| 43 |
return f"Error fetching random fact: {str(e)}"
|