Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,11 @@ def format_prompt(message, history):
|
|
| 14 |
|
| 15 |
|
| 16 |
def generate(
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
):
|
| 19 |
temperature = float(temperature)
|
| 20 |
if temperature < 1e-2:
|
|
@@ -30,7 +34,7 @@ def generate(
|
|
| 30 |
seed=42,
|
| 31 |
)
|
| 32 |
|
| 33 |
-
formatted_prompt = format_prompt(
|
| 34 |
|
| 35 |
stream = client.text_generation(
|
| 36 |
formatted_prompt,
|
|
@@ -49,9 +53,31 @@ def generate(
|
|
| 49 |
|
| 50 |
additional_inputs = [
|
| 51 |
gr.Textbox(
|
| 52 |
-
label="
|
| 53 |
type="text",
|
| 54 |
-
default="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
),
|
| 56 |
gr.Slider(
|
| 57 |
label="Temperature",
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
def generate(
|
| 17 |
+
interview_prompt,
|
| 18 |
+
temperature=0.9,
|
| 19 |
+
max_new_tokens=256,
|
| 20 |
+
top_p=0.95,
|
| 21 |
+
repetition_penalty=1.0,
|
| 22 |
):
|
| 23 |
temperature = float(temperature)
|
| 24 |
if temperature < 1e-2:
|
|
|
|
| 34 |
seed=42,
|
| 35 |
)
|
| 36 |
|
| 37 |
+
formatted_prompt = format_prompt(interview_prompt, [])
|
| 38 |
|
| 39 |
stream = client.text_generation(
|
| 40 |
formatted_prompt,
|
|
|
|
| 53 |
|
| 54 |
additional_inputs = [
|
| 55 |
gr.Textbox(
|
| 56 |
+
label="Interview Prompt",
|
| 57 |
type="text",
|
| 58 |
+
default="""Simulate a GenAI-based interview scenario for the position of Solution Architect with a candidate named "John Doe." Follow these steps:
|
| 59 |
+
|
| 60 |
+
1. Start with a friendly greeting and welcome message. Ask John to introduce himself briefly.
|
| 61 |
+
|
| 62 |
+
2. After John introduces himself, ask if he has any initial thoughts or questions about the position.
|
| 63 |
+
|
| 64 |
+
3. If John shares any initial thoughts or questions, acknowledge them and express appreciation. If not, proceed with the formal interview questions:
|
| 65 |
+
|
| 66 |
+
a. Tools and Technologies: Could you please list and briefly describe the primary tools and technologies you have experience with? Additionally, could you elaborate on how you have applied them in your previous roles?
|
| 67 |
+
|
| 68 |
+
4. After John provides the response to the first question, acknowledge the answer and proceed to the second question:
|
| 69 |
+
|
| 70 |
+
b. Years of Experience: Can you tell us about the number of years of experience you have in the field of solution architecture? Specifically, do you have any notable projects or achievements during your career that demonstrate your expertise?
|
| 71 |
+
|
| 72 |
+
5. After receiving the response to the second question, acknowledge the answer and proceed to the third question:
|
| 73 |
+
|
| 74 |
+
c. Team Leadership: Have you ever led a team in your role as a Solution Architect? How many years have you spent in such a capacity, and what were the most significant learnings or challenges you encountered while doing so?
|
| 75 |
+
|
| 76 |
+
6. After John responds to the third question, acknowledge the answer and conclude the interview:
|
| 77 |
+
|
| 78 |
+
Provide a summary of the key points, including tools used, years of experience, and years leading a team. Express gratitude for John's time and participation.
|
| 79 |
+
|
| 80 |
+
Remember to maintain a natural and polite conversational tone throughout the interview. Address any final thoughts or questions from John in the closing statement."""
|
| 81 |
),
|
| 82 |
gr.Slider(
|
| 83 |
label="Temperature",
|