Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI interface #280

Open
Test67766 opened this issue Mar 21, 2024 · 5 comments
Open

Add CLI interface #280

Test67766 opened this issue Mar 21, 2024 · 5 comments

Comments

@Test67766
Copy link

I appreciate your work, there is a way to use it from command line?

@abi
Copy link
Owner

abi commented Mar 21, 2024

There isn't but if someone wants to submit a PR, happy to include it.

@abi abi changed the title There is a way to use it from CLI? Add CLI interface Mar 21, 2024
@Test67766
Copy link
Author

okay i will try

@abi
Copy link
Owner

abi commented Mar 21, 2024

I'd appreciate it if it didn't refactor the code too much (harder to review PR). There is a eval script that does run the generate code functionality in bulk from CLI: https://github.com/abi/screenshot-to-code/blob/main/Evaluation.md

@Test67766
Copy link
Author

I have add the STACK var but (i have defined at start an OpenAPi on .env fie):

python3 run_evals.py
Traceback (most recent call last):
File "/home/glande/Desktop/screenshot-to-code/backend/run_evals.py", line 43, in
asyncio.run(main())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home//Desktop/screenshot-to-code/backend/run_evals.py", line 31, in main
results = await asyncio.gather(*tasks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/
/Desktop/screenshot-to-code/backend/evals/core.py", line 21, in generate_code_core
if not anthropic_api_key:
^^^^^^^^^^^^^^^^^
NameError: name 'anthropic_api_key' is not defined

@abi
Copy link
Owner

abi commented Mar 22, 2024

You probably just need to set that env var

Repository owner deleted a comment from hoanghohotel Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants