Spaces:
Runtime error
Runtime error
Shroominic
commited on
Commit
·
25a640f
1
Parent(s):
45fad9b
first implementation still wip
Browse files- examples/plot_sin_wave.py +15 -1
examples/plot_sin_wave.py
CHANGED
|
@@ -1 +1,15 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from codeinterpreterapi import CodeInterpreterSession
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
async def main():
|
| 5 |
+
async with CodeInterpreterSession() as session:
|
| 6 |
+
user_request = "Plot a sin wave and show it to me."
|
| 7 |
+
output = await session.generate_response(user_request)
|
| 8 |
+
|
| 9 |
+
print(output.content)
|
| 10 |
+
print(output.files)
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
if __name__ == "__main__":
|
| 14 |
+
import asyncio
|
| 15 |
+
asyncio.run(main())
|