Alex Stern commited on
Commit
460c08a
·
1 Parent(s): d4fb664

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -0
README.md CHANGED
@@ -10,3 +10,48 @@ pinned: false
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
13
+
14
+ ---
15
+ # TTV Email Draft Generator - ReadMe
16
+
17
+ ## Overview
18
+ The TTV Email Draft Generator is a tool designed to streamline email response processes for TTV. Leveraging OpenAI's GPT models, it assists in crafting coherent, contextually relevant email drafts quickly.
19
+
20
+ ## Key Features
21
+ - AI-generated email responses.
22
+ - Customizable response tone and length.
23
+ - Integration with GPT-3.5 and GPT-4 models.
24
+
25
+ ## Functions Description
26
+
27
+ ### `generate_ttv_email_response(email_content, bullet_points, tone, length, model_choice)`
28
+ This function generates an email response based on provided content, bullet points, tone, and length, interfacing with the chosen AI model (GPT-3.5 or GPT-4) to create a draft that aligns with TTV's communication style.
29
+
30
+ ### `sig_figs(x, precision)`
31
+ Rounds a number to a specified number of significant figures, useful for displaying cost estimates with appropriate precision.
32
+
33
+ ### `calculate_token_usage_price(response, model_choice)`
34
+ Calculates the cost of using the OpenAI API, based on the number of tokens used in the request and response, adjusting for the selected model.
35
+
36
+ ### `word_count(word)`
37
+ Counts the number of words in a given string, used to set the 'Matching Client's Email Length' option.
38
+
39
+ ### `get_email_length(email_content, length)`
40
+ Determines the desired length of the email response based on user input and the original email's length, key for customizing the AI-generated response's length.
41
+
42
+ ### `gradio_interface()`
43
+ Defines and launches the Gradio interface, setting up input fields, output displays, and the overall application layout for intuitive use.
44
+
45
+ ## Deployment
46
+ Hosted on Hugging Face Spaces for easy access and usability.
47
+
48
+ ## Usage
49
+ Access via the Hugging Face Spaces link, input original email content, specify bullet points, select desired tone and length, and choose an AI model. Submit to receive a generated response and cost estimate.
50
+
51
+ ## Future Enhancements
52
+ Potential updates include direct email client integration, a customized user interface, and further AI response quality refinements.
53
+
54
+ ---
55
+
56
+ *For detailed instructions and support, refer to the user manual or contact the development team.*
57
+