Compare commits
6 Commits
c9d41b93d5
...
ff48212521
Author | SHA1 | Date |
---|---|---|
ibnaleem | ff48212521 | |
Fatih Kadir Akın | 616903a033 | |
ibnaleem | b6f2b60d91 | |
ibnaleem | df2445168d | |
ibnaleem | d140d000c9 | |
ibnaleem | 1c0c665c13 |
|
@ -9,10 +9,6 @@
|
||||||
<img height="50" alt="Clemta logo" src="https://clemta.com/wp-content/uploads/2023/03/logo-clemta-com-1.png.webp">
|
<img height="50" alt="Clemta logo" src="https://clemta.com/wp-content/uploads/2023/03/logo-clemta-com-1.png.webp">
|
||||||
</a>
|
</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href="https://llmchat.co" align="center" target="_blank">
|
|
||||||
<img height="25" alt="LLMChat" src="https://github.com/user-attachments/assets/78bf6b22-234c-4ee2-a484-869e749eef42">
|
|
||||||
</a>
|
|
||||||
<br><sub><a href="https://git.new/llmchat" target="_blank">https://git.new/llmchat</a></sub><br><br>
|
|
||||||
<a href="https://hf.co/chat" align="center" target="_blank">
|
<a href="https://hf.co/chat" align="center" target="_blank">
|
||||||
<img height="60" alt="Hugging Face logo" src="https://github.com/user-attachments/assets/4187ef06-7cae-402a-a410-e0a999758fed">
|
<img height="60" alt="Hugging Face logo" src="https://github.com/user-attachments/assets/4187ef06-7cae-402a-a410-e0a999758fed">
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
import pandas as pd, sys
|
||||||
|
|
||||||
|
class PromptFinder:
|
||||||
|
def __init__(self, csv_file):
|
||||||
|
self.df = pd.read_csv(csv_file)
|
||||||
|
|
||||||
|
def find(self, search_string):
|
||||||
|
result = self.df[self.df["act"] == search_string]["prompt"].values
|
||||||
|
|
||||||
|
if len(result) > 0:
|
||||||
|
return result[0]
|
||||||
|
else:
|
||||||
|
return f"No prompt found for '{search_string}'."
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
prompt_finder = PromptFinder("../prompts.csv")
|
||||||
|
if not sys.stdin.isatty():
|
||||||
|
act_to_search = sys.stdin.readline().rstrip()
|
||||||
|
else:
|
||||||
|
act_to_search = input("Enter the ACT to search for: ")
|
||||||
|
|
||||||
|
prompt_result = prompt_finder.find(act_to_search)
|
||||||
|
|
||||||
|
print(prompt_result)
|
Loading…
Reference in New Issue